LLDB  mainline
Cocoa.cpp
Go to the documentation of this file.
1 //===-- Cocoa.cpp ---------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #include "Cocoa.h"
10 
12 #include "lldb/Core/Mangled.h"
13 #include "lldb/Core/ValueObject.h"
18 #include "lldb/Host/Time.h"
19 #include "lldb/Target/Language.h"
20 #include "lldb/Target/Process.h"
22 #include "lldb/Target/Target.h"
24 #include "lldb/Utility/Endian.h"
25 #include "lldb/Utility/Status.h"
26 #include "lldb/Utility/Stream.h"
27 
28 #include "llvm/ADT/APInt.h"
29 #include "llvm/ADT/bit.h"
30 
32 
33 #include "NSString.h"
34 
35 using namespace lldb;
36 using namespace lldb_private;
37 using namespace lldb_private::formatters;
38 
40  ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
41  ProcessSP process_sp = valobj.GetProcessSP();
42  if (!process_sp)
43  return false;
44 
45  ObjCLanguageRuntime *runtime = ObjCLanguageRuntime::Get(*process_sp);
46 
47  if (!runtime)
48  return false;
49 
51  runtime->GetClassDescriptor(valobj));
52 
53  if (!descriptor || !descriptor->IsValid())
54  return false;
55 
56  uint32_t ptr_size = process_sp->GetAddressByteSize();
57 
58  lldb::addr_t valobj_addr = valobj.GetValueAsUnsigned(0);
59 
60  if (!valobj_addr)
61  return false;
62 
63  llvm::StringRef class_name(descriptor->GetClassName().GetCString());
64 
65  if (class_name.empty())
66  return false;
67 
68  if (class_name == "NSBundle") {
69  uint64_t offset = 5 * ptr_size;
70  ValueObjectSP text(valobj.GetSyntheticChildAtOffset(
71  offset,
73  true));
74 
75  if (!text)
76  return false;
77 
78  StreamString summary_stream;
79  bool was_nsstring_ok =
80  NSStringSummaryProvider(*text, summary_stream, options);
81  if (was_nsstring_ok && summary_stream.GetSize() > 0) {
82  stream.Printf("%s", summary_stream.GetData());
83  return true;
84  }
85  }
86 
87  return false;
88 }
89 
91  ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
92  ProcessSP process_sp = valobj.GetProcessSP();
93  if (!process_sp)
94  return false;
95 
96  ObjCLanguageRuntime *runtime = ObjCLanguageRuntime::Get(*process_sp);
97 
98  if (!runtime)
99  return false;
100 
102  runtime->GetClassDescriptor(valobj));
103 
104  if (!descriptor || !descriptor->IsValid())
105  return false;
106 
107  uint32_t ptr_size = process_sp->GetAddressByteSize();
108 
109  lldb::addr_t valobj_addr = valobj.GetValueAsUnsigned(0);
110 
111  if (!valobj_addr)
112  return false;
113 
114  llvm::StringRef class_name(descriptor->GetClassName().GetCString());
115 
116  if (class_name.empty())
117  return false;
118 
119  if (class_name == "__NSTimeZone") {
120  uint64_t offset = ptr_size;
121  ValueObjectSP text(valobj.GetSyntheticChildAtOffset(
122  offset, valobj.GetCompilerType(), true));
123 
124  if (!text)
125  return false;
126 
127  StreamString summary_stream;
128  bool was_nsstring_ok =
129  NSStringSummaryProvider(*text, summary_stream, options);
130  if (was_nsstring_ok && summary_stream.GetSize() > 0) {
131  stream.Printf("%s", summary_stream.GetData());
132  return true;
133  }
134  }
135 
136  return false;
137 }
138 
140  ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
141  ProcessSP process_sp = valobj.GetProcessSP();
142  if (!process_sp)
143  return false;
144 
145  ObjCLanguageRuntime *runtime = ObjCLanguageRuntime::Get(*process_sp);
146 
147  if (!runtime)
148  return false;
149 
151  runtime->GetClassDescriptor(valobj));
152 
153  if (!descriptor || !descriptor->IsValid())
154  return false;
155 
156  uint32_t ptr_size = process_sp->GetAddressByteSize();
157 
158  lldb::addr_t valobj_addr = valobj.GetValueAsUnsigned(0);
159 
160  if (!valobj_addr)
161  return false;
162 
163  llvm::StringRef class_name(descriptor->GetClassName().GetCString());
164 
165  if (class_name.empty())
166  return false;
167 
168  if (class_name == "NSConcreteNotification") {
169  uint64_t offset = ptr_size;
170  ValueObjectSP text(valobj.GetSyntheticChildAtOffset(
171  offset, valobj.GetCompilerType(), true));
172 
173  if (!text)
174  return false;
175 
176  StreamString summary_stream;
177  bool was_nsstring_ok =
178  NSStringSummaryProvider(*text, summary_stream, options);
179  if (was_nsstring_ok && summary_stream.GetSize() > 0) {
180  stream.Printf("%s", summary_stream.GetData());
181  return true;
182  }
183  }
184 
185  return false;
186 }
187 
189  ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
190  ProcessSP process_sp = valobj.GetProcessSP();
191  if (!process_sp)
192  return false;
193 
194  ObjCLanguageRuntime *runtime = ObjCLanguageRuntime::Get(*process_sp);
195 
196  if (!runtime)
197  return false;
198 
200  runtime->GetClassDescriptor(valobj));
201 
202  if (!descriptor || !descriptor->IsValid())
203  return false;
204 
205  uint32_t ptr_size = process_sp->GetAddressByteSize();
206 
207  lldb::addr_t valobj_addr = valobj.GetValueAsUnsigned(0);
208 
209  if (!valobj_addr)
210  return false;
211 
212  llvm::StringRef class_name(descriptor->GetClassName().GetCString());
213 
214  if (class_name.empty())
215  return false;
216 
217  uint64_t port_number = 0;
218 
219  if (class_name == "NSMachPort") {
220  uint64_t offset = (ptr_size == 4 ? 12 : 20);
221  Status error;
222  port_number = process_sp->ReadUnsignedIntegerFromMemory(
223  offset + valobj_addr, 4, 0, error);
224  if (error.Success()) {
225  stream.Printf("mach port: %u",
226  (uint32_t)(port_number & 0x00000000FFFFFFFF));
227  return true;
228  }
229  }
230 
231  return false;
232 }
233 
235  ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
236  ProcessSP process_sp = valobj.GetProcessSP();
237  if (!process_sp)
238  return false;
239 
240  ObjCLanguageRuntime *runtime = ObjCLanguageRuntime::Get(*process_sp);
241 
242  if (!runtime)
243  return false;
244 
246  runtime->GetClassDescriptor(valobj));
247 
248  if (!descriptor || !descriptor->IsValid())
249  return false;
250 
251  uint32_t ptr_size = process_sp->GetAddressByteSize();
252 
253  lldb::addr_t valobj_addr = valobj.GetValueAsUnsigned(0);
254 
255  if (!valobj_addr)
256  return false;
257 
258  llvm::StringRef class_name(descriptor->GetClassName().GetCString());
259 
260  if (class_name.empty())
261  return false;
262 
263  uint64_t count = 0;
264 
265  do {
266  if (class_name == "NSIndexSet" || class_name == "NSMutableIndexSet") {
267  Status error;
268  uint32_t mode = process_sp->ReadUnsignedIntegerFromMemory(
269  valobj_addr + ptr_size, 4, 0, error);
270  if (error.Fail())
271  return false;
272  // this means the set is empty - count = 0
273  if ((mode & 1) == 1) {
274  count = 0;
275  break;
276  }
277  if ((mode & 2) == 2)
278  mode = 1; // this means the set only has one range
279  else
280  mode = 2; // this means the set has multiple ranges
281  if (mode == 1) {
282  count = process_sp->ReadUnsignedIntegerFromMemory(
283  valobj_addr + 3 * ptr_size, ptr_size, 0, error);
284  if (error.Fail())
285  return false;
286  } else {
287  // read a pointer to the data at 2*ptr_size
288  count = process_sp->ReadUnsignedIntegerFromMemory(
289  valobj_addr + 2 * ptr_size, ptr_size, 0, error);
290  if (error.Fail())
291  return false;
292  // read the data at 2*ptr_size from the first location
293  count = process_sp->ReadUnsignedIntegerFromMemory(count + 2 * ptr_size,
294  ptr_size, 0, error);
295  if (error.Fail())
296  return false;
297  }
298  } else
299  return false;
300  } while (false);
301  stream.Printf("%" PRIu64 " index%s", count, (count == 1 ? "" : "es"));
302  return true;
303 }
304 
305 static void NSNumber_FormatChar(ValueObject &valobj, Stream &stream, char value,
306  lldb::LanguageType lang) {
307  static ConstString g_TypeHint("NSNumber:char");
308 
309  std::string prefix, suffix;
310  if (Language *language = Language::FindPlugin(lang)) {
311  if (!language->GetFormatterPrefixSuffix(valobj, g_TypeHint, prefix,
312  suffix)) {
313  prefix.clear();
314  suffix.clear();
315  }
316  }
317 
318  stream.Printf("%s%hhd%s", prefix.c_str(), value, suffix.c_str());
319 }
320 
321 static void NSNumber_FormatShort(ValueObject &valobj, Stream &stream,
322  short value, lldb::LanguageType lang) {
323  static ConstString g_TypeHint("NSNumber:short");
324 
325  std::string prefix, suffix;
326  if (Language *language = Language::FindPlugin(lang)) {
327  if (!language->GetFormatterPrefixSuffix(valobj, g_TypeHint, prefix,
328  suffix)) {
329  prefix.clear();
330  suffix.clear();
331  }
332  }
333 
334  stream.Printf("%s%hd%s", prefix.c_str(), value, suffix.c_str());
335 }
336 
337 static void NSNumber_FormatInt(ValueObject &valobj, Stream &stream, int value,
338  lldb::LanguageType lang) {
339  static ConstString g_TypeHint("NSNumber:int");
340 
341  std::string prefix, suffix;
342  if (Language *language = Language::FindPlugin(lang)) {
343  if (!language->GetFormatterPrefixSuffix(valobj, g_TypeHint, prefix,
344  suffix)) {
345  prefix.clear();
346  suffix.clear();
347  }
348  }
349 
350  stream.Printf("%s%d%s", prefix.c_str(), value, suffix.c_str());
351 }
352 
353 static void NSNumber_FormatLong(ValueObject &valobj, Stream &stream,
354  int64_t value, lldb::LanguageType lang) {
355  static ConstString g_TypeHint("NSNumber:long");
356 
357  std::string prefix, suffix;
358  if (Language *language = Language::FindPlugin(lang)) {
359  if (!language->GetFormatterPrefixSuffix(valobj, g_TypeHint, prefix,
360  suffix)) {
361  prefix.clear();
362  suffix.clear();
363  }
364  }
365 
366  stream.Printf("%s%" PRId64 "%s", prefix.c_str(), value, suffix.c_str());
367 }
368 
369 static void NSNumber_FormatInt128(ValueObject &valobj, Stream &stream,
370  const llvm::APInt &value,
371  lldb::LanguageType lang) {
372  static ConstString g_TypeHint("NSNumber:int128_t");
373 
374  std::string prefix, suffix;
375  if (Language *language = Language::FindPlugin(lang)) {
376  if (!language->GetFormatterPrefixSuffix(valobj, g_TypeHint, prefix,
377  suffix)) {
378  prefix.clear();
379  suffix.clear();
380  }
381  }
382 
383  stream.PutCString(prefix.c_str());
384  const int radix = 10;
385  const bool isSigned = true;
386  std::string str = llvm::toString(value, radix, isSigned);
387  stream.PutCString(str.c_str());
388  stream.PutCString(suffix.c_str());
389 }
390 
391 static void NSNumber_FormatFloat(ValueObject &valobj, Stream &stream,
392  float value, lldb::LanguageType lang) {
393  static ConstString g_TypeHint("NSNumber:float");
394 
395  std::string prefix, suffix;
396  if (Language *language = Language::FindPlugin(lang)) {
397  if (!language->GetFormatterPrefixSuffix(valobj, g_TypeHint, prefix,
398  suffix)) {
399  prefix.clear();
400  suffix.clear();
401  }
402  }
403 
404  stream.Printf("%s%f%s", prefix.c_str(), value, suffix.c_str());
405 }
406 
407 static void NSNumber_FormatDouble(ValueObject &valobj, Stream &stream,
408  double value, lldb::LanguageType lang) {
409  static ConstString g_TypeHint("NSNumber:double");
410 
411  std::string prefix, suffix;
412  if (Language *language = Language::FindPlugin(lang)) {
413  if (!language->GetFormatterPrefixSuffix(valobj, g_TypeHint, prefix,
414  suffix)) {
415  prefix.clear();
416  suffix.clear();
417  }
418  }
419 
420  stream.Printf("%s%g%s", prefix.c_str(), value, suffix.c_str());
421 }
422 
424  ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
425  ProcessSP process_sp = valobj.GetProcessSP();
426  if (!process_sp)
427  return false;
428 
430  ObjCLanguageRuntime *runtime = ObjCLanguageRuntime::Get(*process_sp);
431 
432  if (!runtime)
433  return false;
434 
436  runtime->GetClassDescriptor(valobj));
437 
438  if (!descriptor || !descriptor->IsValid())
439  return false;
440 
441  uint32_t ptr_size = process_sp->GetAddressByteSize();
442 
443  lldb::addr_t valobj_addr = valobj.GetValueAsUnsigned(0);
444 
445  if (!valobj_addr)
446  return false;
447 
448  llvm::StringRef class_name(descriptor->GetClassName().GetCString());
449 
450  if (class_name.empty())
451  return false;
452 
453  if (class_name == "__NSCFBoolean")
454  return ObjCBooleanSummaryProvider(valobj, stream, options);
455 
456  if (class_name == "NSDecimalNumber")
457  return NSDecimalNumberSummaryProvider(valobj, stream, options);
458 
459  if (class_name == "NSNumber" || class_name == "__NSCFNumber") {
460  int64_t value = 0;
461  uint64_t i_bits = 0;
462  if (descriptor->GetTaggedPointerInfoSigned(&i_bits, &value)) {
463  // Check for "preserved" numbers. We still don't support them yet.
464  if (i_bits & 0x8) {
465  if (log)
466  log->Printf(
467  "Unsupported (preserved) NSNumber tagged pointer 0x%" PRIu64,
468  valobj_addr);
469  return false;
470  }
471 
472  switch (i_bits) {
473  case 0:
474  NSNumber_FormatChar(valobj, stream, (char)value, options.GetLanguage());
475  break;
476  case 1:
477  case 4:
478  NSNumber_FormatShort(valobj, stream, (short)value,
479  options.GetLanguage());
480  break;
481  case 2:
482  case 8:
483  NSNumber_FormatInt(valobj, stream, (int)value, options.GetLanguage());
484  break;
485  case 3:
486  case 12:
487  NSNumber_FormatLong(valobj, stream, value, options.GetLanguage());
488  break;
489  default:
490  return false;
491  }
492  return true;
493  } else {
494  Status error;
495 
496  AppleObjCRuntime *runtime = llvm::dyn_cast_or_null<AppleObjCRuntime>(
497  ObjCLanguageRuntime::Get(*process_sp));
498 
499  const bool new_format =
500  (runtime && runtime->GetFoundationVersion() >= 1400);
501 
502  enum class TypeCodes : int {
503  sint8 = 0x0,
504  sint16 = 0x1,
505  sint32 = 0x2,
506  sint64 = 0x3,
507  f32 = 0x4,
508  f64 = 0x5,
509  sint128 = 0x6
510  };
511 
512  uint64_t data_location = valobj_addr + 2 * ptr_size;
513  TypeCodes type_code;
514 
515  if (new_format) {
516  uint64_t cfinfoa = process_sp->ReadUnsignedIntegerFromMemory(
517  valobj_addr + ptr_size, ptr_size, 0, error);
518 
519  if (error.Fail())
520  return false;
521 
522  bool is_preserved_number = cfinfoa & 0x8;
523  if (is_preserved_number) {
524  if (log)
525  log->Printf(
526  "Unsupported preserved NSNumber tagged pointer 0x%" PRIu64,
527  valobj_addr);
528  return false;
529  }
530 
531  type_code = static_cast<TypeCodes>(cfinfoa & 0x7);
532  } else {
533  uint8_t data_type = process_sp->ReadUnsignedIntegerFromMemory(
534  valobj_addr + ptr_size, 1, 0, error) &
535  0x1F;
536 
537  if (error.Fail())
538  return false;
539 
540  switch (data_type) {
541  case 1:
542  type_code = TypeCodes::sint8;
543  break;
544  case 2:
545  type_code = TypeCodes::sint16;
546  break;
547  case 3:
548  type_code = TypeCodes::sint32;
549  break;
550  case 17:
551  data_location += 8;
552  LLVM_FALLTHROUGH;
553  case 4:
554  type_code = TypeCodes::sint64;
555  break;
556  case 5:
557  type_code = TypeCodes::f32;
558  break;
559  case 6:
560  type_code = TypeCodes::f64;
561  break;
562  default:
563  return false;
564  }
565  }
566 
567  uint64_t value = 0;
568  bool success = false;
569  switch (type_code) {
570  case TypeCodes::sint8:
571  value = process_sp->ReadUnsignedIntegerFromMemory(data_location, 1, 0,
572  error);
573  if (error.Fail())
574  return false;
575  NSNumber_FormatChar(valobj, stream, (char)value, options.GetLanguage());
576  success = true;
577  break;
578  case TypeCodes::sint16:
579  value = process_sp->ReadUnsignedIntegerFromMemory(data_location, 2, 0,
580  error);
581  if (error.Fail())
582  return false;
583  NSNumber_FormatShort(valobj, stream, (short)value,
584  options.GetLanguage());
585  success = true;
586  break;
587  case TypeCodes::sint32:
588  value = process_sp->ReadUnsignedIntegerFromMemory(data_location, 4, 0,
589  error);
590  if (error.Fail())
591  return false;
592  NSNumber_FormatInt(valobj, stream, (int)value, options.GetLanguage());
593  success = true;
594  break;
595  case TypeCodes::sint64:
596  value = process_sp->ReadUnsignedIntegerFromMemory(data_location, 8, 0,
597  error);
598  if (error.Fail())
599  return false;
600  NSNumber_FormatLong(valobj, stream, value, options.GetLanguage());
601  success = true;
602  break;
603  case TypeCodes::f32: {
604  uint32_t flt_as_int = process_sp->ReadUnsignedIntegerFromMemory(
605  data_location, 4, 0, error);
606  if (error.Fail())
607  return false;
608  float flt_value = 0.0f;
609  memcpy(&flt_value, &flt_as_int, sizeof(flt_as_int));
610  NSNumber_FormatFloat(valobj, stream, flt_value, options.GetLanguage());
611  success = true;
612  break;
613  }
614  case TypeCodes::f64: {
615  uint64_t dbl_as_lng = process_sp->ReadUnsignedIntegerFromMemory(
616  data_location, 8, 0, error);
617  if (error.Fail())
618  return false;
619  double dbl_value = 0.0;
620  memcpy(&dbl_value, &dbl_as_lng, sizeof(dbl_as_lng));
621  NSNumber_FormatDouble(valobj, stream, dbl_value, options.GetLanguage());
622  success = true;
623  break;
624  }
625  case TypeCodes::sint128: // internally, this is the same
626  {
627  uint64_t words[2];
628  words[1] = process_sp->ReadUnsignedIntegerFromMemory(data_location, 8,
629  0, error);
630  if (error.Fail())
631  return false;
632  words[0] = process_sp->ReadUnsignedIntegerFromMemory(data_location + 8,
633  8, 0, error);
634  if (error.Fail())
635  return false;
636  llvm::APInt i128_value(128, words);
637  NSNumber_FormatInt128(valobj, stream, i128_value,
638  options.GetLanguage());
639  success = true;
640  break;
641  }
642  }
643  return success;
644  }
645  }
646 
647  return false;
648 }
649 
651  ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
652  ProcessSP process_sp = valobj.GetProcessSP();
653  if (!process_sp)
654  return false;
655 
656  lldb::addr_t valobj_addr = valobj.GetValueAsUnsigned(0);
657  uint32_t ptr_size = process_sp->GetAddressByteSize();
658 
659  Status error;
660  int8_t exponent = process_sp->ReadUnsignedIntegerFromMemory(
661  valobj_addr + ptr_size, 1, 0, error);
662  if (error.Fail())
663  return false;
664 
665  uint8_t length_and_negative = process_sp->ReadUnsignedIntegerFromMemory(
666  valobj_addr + ptr_size + 1, 1, 0, error);
667  if (error.Fail())
668  return false;
669 
670  // Fifth bit marks negativity.
671  const bool is_negative = (length_and_negative >> 4) & 1;
672 
673  // Zero length and negative means NaN.
674  uint8_t length = length_and_negative & 0xf;
675  const bool is_nan = is_negative && (length == 0);
676 
677  if (is_nan) {
678  stream.Printf("NaN");
679  return true;
680  }
681 
682  if (length == 0) {
683  stream.Printf("0");
684  return true;
685  }
686 
687  uint64_t mantissa = process_sp->ReadUnsignedIntegerFromMemory(
688  valobj_addr + ptr_size + 4, 8, 0, error);
689  if (error.Fail())
690  return false;
691 
692  if (is_negative)
693  stream.Printf("-");
694 
695  stream.Printf("%" PRIu64 " x 10^%" PRIi8, mantissa, exponent);
696  return true;
697 }
698 
700  ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
701  ProcessSP process_sp = valobj.GetProcessSP();
702  if (!process_sp)
703  return false;
704 
705  ObjCLanguageRuntime *runtime = ObjCLanguageRuntime::Get(*process_sp);
706 
707  if (!runtime)
708  return false;
709 
711  runtime->GetClassDescriptor(valobj));
712 
713  if (!descriptor || !descriptor->IsValid())
714  return false;
715 
716  uint32_t ptr_size = process_sp->GetAddressByteSize();
717 
718  lldb::addr_t valobj_addr = valobj.GetValueAsUnsigned(0);
719 
720  if (!valobj_addr)
721  return false;
722 
723  llvm::StringRef class_name = descriptor->GetClassName().GetStringRef();
724 
725  if (!class_name.equals("NSURL"))
726  return false;
727 
728  uint64_t offset_text = ptr_size + ptr_size +
729  8; // ISA + pointer + 8 bytes of data (even on 32bit)
730  uint64_t offset_base = offset_text + ptr_size;
731  CompilerType type(valobj.GetCompilerType());
732  ValueObjectSP text(valobj.GetSyntheticChildAtOffset(offset_text, type, true));
733  ValueObjectSP base(valobj.GetSyntheticChildAtOffset(offset_base, type, true));
734  if (!text || text->GetValueAsUnsigned(0) == 0)
735  return false;
736 
737  StreamString base_summary;
738  if (base && base->GetValueAsUnsigned(0)) {
739  if (!NSURLSummaryProvider(*base, base_summary, options))
740  base_summary.Clear();
741  }
742  if (base_summary.Empty())
743  return NSStringSummaryProvider(*text, stream, options);
744 
745  StreamString summary;
746  if (!NSStringSummaryProvider(*text, summary, options) || summary.Empty())
747  return false;
748 
749  const char quote_char = '"';
750  std::string prefix, suffix;
751  if (Language *language = Language::FindPlugin(options.GetLanguage())) {
752  if (!language->GetFormatterPrefixSuffix(*text, ConstString("NSString"),
753  prefix, suffix)) {
754  prefix.clear();
755  suffix.clear();
756  }
757  }
758  // @"A" -> @"A
759  llvm::StringRef summary_str = summary.GetString();
760  bool back_consumed = summary_str.consume_back(quote_char + suffix);
761  assert(back_consumed);
762  UNUSED_IF_ASSERT_DISABLED(back_consumed);
763  // @"B" -> B"
764  llvm::StringRef base_summary_str = base_summary.GetString();
765  bool front_consumed = base_summary_str.consume_front(prefix + quote_char);
766  assert(front_consumed);
767  UNUSED_IF_ASSERT_DISABLED(front_consumed);
768  // @"A -- B"
769  if (!summary_str.empty() && !base_summary_str.empty()) {
770  stream.Printf("%s -- %s", summary_str.str().c_str(),
771  base_summary_str.str().c_str());
772  return true;
773  }
774 
775  return false;
776 }
777 
778 /// Bias value for tagged pointer exponents.
779 /// Recommended values:
780 /// 0x3e3: encodes all dates between distantPast and distantFuture
781 /// except for the range within about 1e-28 second of the reference date.
782 /// 0x3ef: encodes all dates for a few million years beyond distantPast and
783 /// distantFuture, except within about 1e-25 second of the reference date.
784 const int TAGGED_DATE_EXPONENT_BIAS = 0x3ef;
785 
786 struct DoubleBits {
787  uint64_t fraction : 52; // unsigned
788  uint64_t exponent : 11; // signed
789  uint64_t sign : 1;
790 };
791 
793  uint64_t fraction : 52; // unsigned
794  uint64_t exponent : 7; // signed
795  uint64_t sign : 1;
796  uint64_t unused : 4; // placeholder for pointer tag bits
797 };
798 
799 static uint64_t decodeExponent(uint64_t exp) {
800  // Tagged exponent field is 7-bit signed. Sign-extend the value to 64 bits
801  // before performing arithmetic.
802  return llvm::SignExtend64<7>(exp) + TAGGED_DATE_EXPONENT_BIAS;
803 }
804 
805 static double decodeTaggedTimeInterval(uint64_t encodedTimeInterval) {
806  if (encodedTimeInterval == 0)
807  return 0.0;
808  if (encodedTimeInterval == std::numeric_limits<uint64_t>::max())
809  return (uint64_t)-0.0;
810 
811  TaggedDoubleBits encodedBits =
812  llvm::bit_cast<TaggedDoubleBits>(encodedTimeInterval);
813  assert(encodedBits.unused == 0);
814 
815  // Sign and fraction are represented exactly.
816  // Exponent is encoded.
817  DoubleBits decodedBits;
818  decodedBits.sign = encodedBits.sign;
819  decodedBits.fraction = encodedBits.fraction;
820  decodedBits.exponent = decodeExponent(encodedBits.exponent);
821 
822  return llvm::bit_cast<double>(decodedBits);
823 }
824 
826  ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
827  ProcessSP process_sp = valobj.GetProcessSP();
828  if (!process_sp)
829  return false;
830 
831  ObjCLanguageRuntime *runtime = ObjCLanguageRuntime::Get(*process_sp);
832 
833  if (!runtime)
834  return false;
835 
837  runtime->GetClassDescriptor(valobj));
838 
839  if (!descriptor || !descriptor->IsValid())
840  return false;
841 
842  uint32_t ptr_size = process_sp->GetAddressByteSize();
843 
844  lldb::addr_t valobj_addr = valobj.GetValueAsUnsigned(0);
845 
846  if (!valobj_addr)
847  return false;
848 
849  uint64_t date_value_bits = 0;
850  double date_value = 0.0;
851 
852  ConstString class_name = descriptor->GetClassName();
853 
854  static const ConstString g_NSDate("NSDate");
855  static const ConstString g___NSDate("__NSDate");
856  static const ConstString g___NSTaggedDate("__NSTaggedDate");
857  static const ConstString g_NSCalendarDate("NSCalendarDate");
858  static const ConstString g_NSConstantDate("NSConstantDate");
859 
860  if (class_name.IsEmpty())
861  return false;
862 
863  uint64_t info_bits = 0, value_bits = 0;
864  if ((class_name == g_NSDate) || (class_name == g___NSDate) ||
865  (class_name == g___NSTaggedDate) || (class_name == g_NSConstantDate)) {
866  if (descriptor->GetTaggedPointerInfo(&info_bits, &value_bits)) {
867  date_value_bits = ((value_bits << 8) | (info_bits << 4));
868  memcpy(&date_value, &date_value_bits, sizeof(date_value_bits));
869  } else {
870  llvm::Triple triple(
871  process_sp->GetTarget().GetArchitecture().GetTriple());
872  uint32_t delta =
873  (triple.isWatchOS() && triple.isWatchABI()) ? 8 : ptr_size;
874  Status error;
875  date_value_bits = process_sp->ReadUnsignedIntegerFromMemory(
876  valobj_addr + delta, 8, 0, error);
877  memcpy(&date_value, &date_value_bits, sizeof(date_value_bits));
878  if (error.Fail())
879  return false;
880  }
881  } else if (class_name == g_NSCalendarDate) {
882  Status error;
883  date_value_bits = process_sp->ReadUnsignedIntegerFromMemory(
884  valobj_addr + 2 * ptr_size, 8, 0, error);
885  memcpy(&date_value, &date_value_bits, sizeof(date_value_bits));
886  if (error.Fail())
887  return false;
888  } else
889  return false;
890 
891  // FIXME: It seems old dates are not formatted according to NSDate's calendar
892  // so we hardcode distantPast's value so that it looks like LLDB is doing
893  // the right thing.
894 
895  // The relative time in seconds from Cocoa Epoch to [NSDate distantPast].
896  const double RelSecondsFromCocoaEpochToNSDateDistantPast = -63114076800;
897  if (date_value == RelSecondsFromCocoaEpochToNSDateDistantPast) {
898  stream.Printf("0001-01-01 00:00:00 UTC");
899  return true;
900  }
901 
902  // Accomodate for the __NSTaggedDate format introduced in Foundation 1600.
903  if (class_name == g___NSTaggedDate) {
904  auto *runtime = llvm::dyn_cast_or_null<AppleObjCRuntime>(
905  ObjCLanguageRuntime::Get(*process_sp));
906  if (runtime && runtime->GetFoundationVersion() >= 1600)
907  date_value = decodeTaggedTimeInterval(value_bits << 4);
908  }
909 
910  // this snippet of code assumes that time_t == seconds since Jan-1-1970 this
911  // is generally true and POSIXly happy, but might break if a library vendor
912  // decides to get creative
913  time_t epoch = GetOSXEpoch();
914  epoch = epoch + static_cast<time_t>(std::floor(date_value));
915  tm *tm_date = gmtime(&epoch);
916  if (!tm_date)
917  return false;
918  std::string buffer(1024, 0);
919  if (strftime(&buffer[0], 1023, "%Z", tm_date) == 0)
920  return false;
921  stream.Printf("%04d-%02d-%02d %02d:%02d:%02d %s", tm_date->tm_year + 1900,
922  tm_date->tm_mon + 1, tm_date->tm_mday, tm_date->tm_hour,
923  tm_date->tm_min, tm_date->tm_sec, buffer.c_str());
924  return true;
925 }
926 
928  ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
929  ProcessSP process_sp = valobj.GetProcessSP();
930  if (!process_sp)
931  return false;
932 
933  ObjCLanguageRuntime *runtime = ObjCLanguageRuntime::Get(*process_sp);
934 
935  if (!runtime)
936  return false;
937 
939  runtime->GetClassDescriptorFromISA(valobj.GetValueAsUnsigned(0)));
940 
941  if (!descriptor || !descriptor->IsValid())
942  return false;
943 
944  ConstString class_name = descriptor->GetClassName();
945 
946  if (class_name.IsEmpty())
947  return false;
948 
949  if (ConstString cs = Mangled(class_name).GetDemangledName())
950  class_name = cs;
951 
952  stream.Printf("%s", class_name.AsCString("<unknown class>"));
953  return true;
954 }
955 
957 public:
958  ObjCClassSyntheticChildrenFrontEnd(lldb::ValueObjectSP valobj_sp)
959  : SyntheticChildrenFrontEnd(*valobj_sp) {}
960 
961  ~ObjCClassSyntheticChildrenFrontEnd() override = default;
962 
963  size_t CalculateNumChildren() override { return 0; }
964 
965  lldb::ValueObjectSP GetChildAtIndex(size_t idx) override {
966  return lldb::ValueObjectSP();
967  }
968 
969  bool Update() override { return false; }
970 
971  bool MightHaveChildren() override { return false; }
972 
973  size_t GetIndexOfChildWithName(ConstString name) override {
974  return UINT32_MAX;
975  }
976 };
977 
980  CXXSyntheticChildren *, lldb::ValueObjectSP valobj_sp) {
981  return new ObjCClassSyntheticChildrenFrontEnd(valobj_sp);
982 }
983 
984 template <bool needs_at>
986  ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
987  ProcessSP process_sp = valobj.GetProcessSP();
988  if (!process_sp)
989  return false;
990 
991  ObjCLanguageRuntime *runtime = ObjCLanguageRuntime::Get(*process_sp);
992 
993  if (!runtime)
994  return false;
995 
997  runtime->GetClassDescriptor(valobj));
998 
999  if (!descriptor || !descriptor->IsValid())
1000  return false;
1001 
1002  bool is_64bit = (process_sp->GetAddressByteSize() == 8);
1003  lldb::addr_t valobj_addr = valobj.GetValueAsUnsigned(0);
1004 
1005  if (!valobj_addr)
1006  return false;
1007 
1008  uint64_t value = 0;
1009 
1010  llvm::StringRef class_name = descriptor->GetClassName().GetCString();
1011 
1012  if (class_name.empty())
1013  return false;
1014 
1015  bool isNSConcreteData = class_name == "NSConcreteData";
1016  bool isNSConcreteMutableData = class_name == "NSConcreteMutableData";
1017  bool isNSCFData = class_name == "__NSCFData";
1018  if (isNSConcreteData || isNSConcreteMutableData || isNSCFData) {
1019  uint32_t offset;
1020  if (isNSConcreteData)
1021  offset = is_64bit ? 8 : 4;
1022  else
1023  offset = is_64bit ? 16 : 8;
1024 
1025  Status error;
1026  value = process_sp->ReadUnsignedIntegerFromMemory(
1027  valobj_addr + offset, is_64bit ? 8 : 4, 0, error);
1028  if (error.Fail())
1029  return false;
1030  } else if (class_name == "_NSInlineData") {
1031  uint32_t offset = (is_64bit ? 8 : 4);
1032  Status error;
1033  value = process_sp->ReadUnsignedIntegerFromMemory(valobj_addr + offset, 2,
1034  0, error);
1035  if (error.Fail())
1036  return false;
1037  } else if (class_name == "_NSZeroData") {
1038  value = 0;
1039  } else
1040  return false;
1041 
1042  stream.Printf("%s%" PRIu64 " byte%s%s", (needs_at ? "@\"" : ""), value,
1043  (value != 1 ? "s" : ""), (needs_at ? "\"" : ""));
1044 
1045  return true;
1046 }
1047 
1049  ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
1050  const uint32_t type_info = valobj.GetCompilerType().GetTypeInfo();
1051 
1052  ValueObjectSP real_guy_sp = valobj.GetSP();
1053 
1054  if (type_info & eTypeIsPointer) {
1055  Status err;
1056  real_guy_sp = valobj.Dereference(err);
1057  if (err.Fail() || !real_guy_sp)
1058  return false;
1059  } else if (type_info & eTypeIsReference) {
1060  real_guy_sp = valobj.GetChildAtIndex(0, true);
1061  if (!real_guy_sp)
1062  return false;
1063  }
1064  int8_t value = (real_guy_sp->GetValueAsSigned(0) & 0xFF);
1065  switch (value) {
1066  case 0:
1067  stream.Printf("NO");
1068  break;
1069  case 1:
1070  stream.Printf("YES");
1071  break;
1072  default:
1073  stream.Printf("%d", value);
1074  break;
1075  }
1076  return true;
1077 }
1078 
1080  ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
1081  lldb::addr_t valobj_ptr_value =
1083  if (valobj_ptr_value == LLDB_INVALID_ADDRESS)
1084  return false;
1085 
1086  ProcessSP process_sp(valobj.GetProcessSP());
1087  if (!process_sp)
1088  return false;
1089 
1090  if (AppleObjCRuntime *objc_runtime = llvm::dyn_cast_or_null<AppleObjCRuntime>(
1091  ObjCLanguageRuntime::Get(*process_sp))) {
1093  cf_false = LLDB_INVALID_ADDRESS;
1094  objc_runtime->GetValuesForGlobalCFBooleans(cf_true, cf_false);
1095  if (valobj_ptr_value == cf_true) {
1096  stream.PutCString("YES");
1097  return true;
1098  }
1099  if (valobj_ptr_value == cf_false) {
1100  stream.PutCString("NO");
1101  return true;
1102  }
1103  }
1104 
1105  return false;
1106 }
1107 
1108 template <bool is_sel_ptr>
1110  ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
1111  lldb::ValueObjectSP valobj_sp;
1112 
1113  CompilerType charstar(valobj.GetCompilerType()
1115  .GetPointerType());
1116 
1117  if (!charstar)
1118  return false;
1119 
1120  ExecutionContext exe_ctx(valobj.GetExecutionContextRef());
1121 
1122  if (is_sel_ptr) {
1123  lldb::addr_t data_address = valobj.GetValueAsUnsigned(LLDB_INVALID_ADDRESS);
1124  if (data_address == LLDB_INVALID_ADDRESS)
1125  return false;
1126  valobj_sp = ValueObject::CreateValueObjectFromAddress("text", data_address,
1127  exe_ctx, charstar);
1128  } else {
1129  DataExtractor data;
1130  Status error;
1131  valobj.GetData(data, error);
1132  if (error.Fail())
1133  return false;
1134  valobj_sp =
1135  ValueObject::CreateValueObjectFromData("text", data, exe_ctx, charstar);
1136  }
1137 
1138  if (!valobj_sp)
1139  return false;
1140 
1141  stream.Printf("%s", valobj_sp->GetSummaryAsCString());
1142  return true;
1143 }
1144 
1145 // POSIX has an epoch on Jan-1-1970, but Cocoa prefers Jan-1-2001
1146 // this call gives the POSIX equivalent of the Cocoa epoch
1148  static time_t epoch = 0;
1149  if (!epoch) {
1150 #ifndef _WIN32
1151  tzset();
1152  tm tm_epoch;
1153  tm_epoch.tm_sec = 0;
1154  tm_epoch.tm_hour = 0;
1155  tm_epoch.tm_min = 0;
1156  tm_epoch.tm_mon = 0;
1157  tm_epoch.tm_mday = 1;
1158  tm_epoch.tm_year = 2001 - 1900;
1159  tm_epoch.tm_isdst = -1;
1160  tm_epoch.tm_gmtoff = 0;
1161  tm_epoch.tm_zone = nullptr;
1162  epoch = timegm(&tm_epoch);
1163 #endif
1164  }
1165  return epoch;
1166 }
1167 
1169  ValueObject &, Stream &, const TypeSummaryOptions &);
1170 
1172  ValueObject &, Stream &, const TypeSummaryOptions &);
1173 
1175  ValueObject &, Stream &, const TypeSummaryOptions &);
1176 
1178  ValueObject &, Stream &, const TypeSummaryOptions &);
TaggedDoubleBits
Definition: Cocoa.cpp:792
lldb::SBLineEntry
class LLDB_API SBLineEntry
Definition: SBDefines.h:55
lldb_private::ValueObject::GetData
virtual uint64_t GetData(DataExtractor &data, Status &error)
Definition: ValueObject.cpp:765
SymbolFilePDB
Definition: SymbolFilePDB.h:24
DIERef
Identifies a DWARF debug info entry within a given Module.
Definition: DIERef.h:26
ABISysV_hexagon
Definition: ABISysV_hexagon.h:16
PlatformRemoteAppleWatch
Definition: PlatformRemoteAppleWatch.h:21
TAGGED_DATE_EXPONENT_BIAS
const int TAGGED_DATE_EXPONENT_BIAS
Bias value for tagged pointer exponents.
Definition: Cocoa.cpp:784
lldb_private::ValueObject::GetValueAsUnsigned
virtual uint64_t GetValueAsUnsigned(uint64_t fail_value, bool *success=nullptr)
Definition: ValueObject.cpp:1088
lldb_private::ExecutionContext
Definition: ExecutionContext.h:292
lldb::SBThreadCollection
class LLDB_API SBThreadCollection
Definition: SBDefines.h:76
set
set(LLVM_OPTIONAL_SOURCES LocateSymbolFileMacOSX.cpp) if(CMAKE_SYSTEM_NAME MATCHES "Darwin") set(PLATFORM_SOURCES LocateSymbolFileMacOSX.cpp) endif() add_lldb_library(lldbSymbol ArmUnwindInfo.cpp Block.cpp CompactUnwindInfo.cpp CompileUnit.cpp CompilerDecl.cpp CompilerDeclContext.cpp CompilerType.cpp DWARFCallFrameInfo.cpp DebugMacros.cpp DeclVendor.cpp FuncUnwinders.cpp Function.cpp LineEntry.cpp LineTable.cpp LocateSymbolFile.cpp ObjectFile.cpp PostfixExpression.cpp Symbol.cpp SymbolContext.cpp SymbolFile.cpp SymbolVendor.cpp Symtab.cpp Type.cpp TypeList.cpp TypeMap.cpp TypeSystem.cpp UnwindPlan.cpp UnwindTable.cpp Variable.cpp VariableList.cpp $
Definition: Symbol/CMakeLists.txt:1
RegisterContextFreeBSD_powerpc
Definition: RegisterContextFreeBSD_powerpc.h:15
CFCMutableSet
Definition: CFCMutableSet.h:14
ObjectFileJIT
Definition: ObjectFileJIT.h:17
lldb::SBQueue
class LLDB_API SBQueue
Definition: SBDefines.h:64
Mangled.h
ThreadMachCore
Definition: ThreadMachCore.h:18
PlatformRemoteMacOSX
Definition: PlatformRemoteMacOSX.h:21
UNUSED_IF_ASSERT_DISABLED
#define UNUSED_IF_ASSERT_DISABLED(x)
Definition: lldb-defines.h:137
lldb_private::formatters::ObjCClassSummaryProvider
bool ObjCClassSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: Cocoa.cpp:927
timegm
time_t timegm(struct tm *t)
Definition: android/LibcGlue.cpp:24
set
set(EXTRA_CXXFLAGS "") if(CXX_SUPPORTS_NO_GNU_ANONYMOUS_STRUCT) set(EXTRA_CXXFLAGS $
Definition: Plugins/Language/ObjC/CMakeLists.txt:1
lldb::SBBlock
class LLDB_API SBBlock
Definition: SBDefines.h:22
lldb_private::formatters::NSDateSummaryProvider
bool NSDateSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: Cocoa.cpp:825
RegisterContextLinux_x86_64
Definition: RegisterContextLinux_x86_64.h:14
PlatformAppleSimulator
Definition: PlatformAppleSimulator.h:21
lldb_private::ObjCLanguageRuntime
Definition: ObjCLanguageRuntime.h:34
lldb_private::ObjCLanguageRuntime::ClassDescriptorSP
std::shared_ptr< ClassDescriptor > ClassDescriptorSP
Definition: ObjCLanguageRuntime.h:44
remove_module_flags
remove_module_flags() include_directories(..) add_lldb_library(lldbHostMacOSXObjCXX Host.mm HostInfoMacOSX.mm HostThreadMacOSX.mm LINK_LIBS lldbUtility $
Definition: Host/macosx/objcxx/CMakeLists.txt:2
lldb::SBMemoryRegionInfoList
class LLDB_API SBMemoryRegionInfoList
Definition: SBDefines.h:58
DWARFDebugAranges
Definition: DWARFDebugAranges.h:16
if
if(NOT LIBIPT_INCLUDE_PATH) message(FATAL_ERROR "libipt include path not provided") endif() if(NOT EXISTS "$
Definition: Plugins/Trace/intel-pt/CMakeLists.txt:1
ThreadMemory
Definition: ThreadMemory.h:16
lldb_private::formatters::ObjCSELSummaryProvider< false >
template bool ObjCSELSummaryProvider< false >(ValueObject &, Stream &, const TypeSummaryOptions &)
lldb::SBError
class LLDB_API SBError
Definition: SBDefines.h:40
lldb_private::formatters::ObjCBOOLSummaryProvider
bool ObjCBOOLSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: Cocoa.cpp:1048
lldb::SBStructuredData
class LLDB_API SBStructuredData
Definition: SBDefines.h:70
PECallFrameInfo
Definition: PECallFrameInfo.h:25
RegisterContextPOSIX_mips64
Definition: RegisterContextPOSIX_mips64.h:17
MSVCUndecoratedNameParser
Definition: MSVCUndecoratedNameParser.h:31
ProcessKDP
Definition: ProcessKDP.h:30
RegisterContextOpenBSD_x86_64
Definition: RegisterContextOpenBSD_x86_64.h:14
lldb::SBDeclaration
class LLDB_API SBDeclaration
Definition: SBDefines.h:38
PlatformRemoteAppleTV
Definition: PlatformRemoteAppleTV.h:20
lldb::SBTypeSynthetic
class LLDB_API SBTypeSynthetic
Definition: SBDefines.h:89
lldb::SBCommandInterpreterRunOptions
class LLDB_API SBCommandInterpreterRunOptions
Definition: SBDefines.h:30
lldb_private::ObjCLanguageRuntime::GetClassDescriptorFromISA
virtual ClassDescriptorSP GetClassDescriptorFromISA(ObjCISA isa)
Definition: ObjCLanguageRuntime.cpp:273
DWARFDebugInfo
Definition: DWARFDebugInfo.h:26
DWARFTypeUnit
Definition: DWARFTypeUnit.h:15
lldb_tablegen
lldb_tablegen(CoreProperties.inc -gen-lldb-property-defs SOURCE CoreProperties.td TARGET LLDBCorePropertiesGen) lldb_tablegen(CorePropertiesEnum.inc -gen-lldb-property-enum-defs SOURCE CoreProperties.td TARGET LLDBCorePropertiesEnumGen) set(LLDB_CURSES_LIBS) set(LLDB_LIBEDIT_LIBS) if(LLDB_ENABLE_CURSES) list(APPEND LLDB_CURSES_LIBS $
Definition: Core/CMakeLists.txt:1
TaggedDoubleBits::unused
uint64_t unused
Definition: Cocoa.cpp:796
add_subdirectory
add_subdirectory(ABI) add_subdirectory(Architecture) add_subdirectory(Disassembler) add_subdirectory(DynamicLoader) add_subdirectory(ExpressionParser) add_subdirectory(Instruction) add_subdirectory(InstrumentationRuntime) add_subdirectory(JITLoader) add_subdirectory(Language) add_subdirectory(LanguageRuntime) add_subdirectory(MemoryHistory) add_subdirectory(ObjectContainer) add_subdirectory(ObjectFile) add_subdirectory(OperatingSystem) add_subdirectory(Platform) add_subdirectory(Process) add_subdirectory(ScriptInterpreter) add_subdirectory(StructuredData) add_subdirectory(SymbolFile) add_subdirectory(SystemRuntime) add_subdirectory(SymbolVendor) add_subdirectory(Trace) add_subdirectory(TraceExporter) add_subdirectory(TypeSystem) add_subdirectory(UnwindAssembly) set(LLDB_STRIPPED_PLUGINS) get_property(LLDB_ALL_PLUGINS GLOBAL PROPERTY LLDB_PLUGINS) set(LLDB_ENUM_PLUGINS "") set(LLDB_PROCESS_WINDOWS_PLUGIN "") set(LLDB_PROCESS_GDB_PLUGIN "") foreach(p $
Definition: Plugins/CMakeLists.txt:1
lldb_tablegen
lldb_tablegen(ProcessGDBRemoteProperties.inc -gen-lldb-property-defs SOURCE ProcessGDBRemoteProperties.td TARGET LLDBPluginProcessGDBRemotePropertiesGen) lldb_tablegen(ProcessGDBRemotePropertiesEnum.inc -gen-lldb-property-enum-defs SOURCE ProcessGDBRemoteProperties.td TARGET LLDBPluginProcessGDBRemotePropertiesEnumGen) set(LLDB_PLUGINS lldbPluginProcessUtility lldbPluginPlatformMacOSX) if(HAVE_LIBCOMPRESSION) set(LIBCOMPRESSION compression) endif() add_lldb_library(lldbPluginProcessGDBRemote PLUGIN GDBRemoteClientBase.cpp GDBRemoteCommunication.cpp GDBRemoteCommunicationClient.cpp GDBRemoteCommunicationHistory.cpp GDBRemoteCommunicationReplayServer.cpp GDBRemoteCommunicationServer.cpp GDBRemoteCommunicationServerCommon.cpp GDBRemoteCommunicationServerLLGS.cpp GDBRemoteCommunicationServerPlatform.cpp GDBRemoteRegisterContext.cpp ProcessGDBRemote.cpp ProcessGDBRemoteLog.cpp ThreadGDBRemote.cpp LINK_LIBS lldbBreakpoint lldbCore lldbDataFormatters lldbHost lldbInterpreter lldbSymbol lldbTarget lldbUtility $
Definition: Plugins/Process/gdb-remote/CMakeLists.txt:1
NSNumber_FormatDouble
static void NSNumber_FormatDouble(ValueObject &valobj, Stream &stream, double value, lldb::LanguageType lang)
Definition: Cocoa.cpp:407
lldb::SBDebugger
class LLDB_API SBDebugger
Definition: SBDefines.h:37
UniqueDWARFASTType
Definition: UniqueDWARFASTType.h:19
lldb::SBListener
class LLDB_API SBListener
Definition: SBDefines.h:56
lldb::SBTypeSummary
class LLDB_API SBTypeSummary
Definition: SBDefines.h:87
ObjCClassSyntheticChildrenFrontEnd
Definition: Cocoa.cpp:956
ABIWindows_x86_64
Definition: ABIWindows_x86_64.h:14
SymbolFileDWARF
Definition: SymbolFileDWARF.h:58
DynamicLoaderPOSIXDYLD
Definition: DynamicLoaderPOSIXDYLD.h:23
lldb_private::formatters::NSNumberSummaryProvider
bool NSNumberSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: Cocoa.cpp:423
ObjectContainerBSDArchive
Definition: ObjectContainerBSDArchive.h:24
lldb::LanguageType
LanguageType
Programming language type.
Definition: lldb-enumerations.h:436
lldb_private::SyntheticChildrenFrontEnd
Definition: TypeSynthetic.h:27
RegisterContextKDP_x86_64
Definition: RegisterContextKDP_x86_64.h:16
SelectHelper
Definition: SelectHelper.h:20
NOT
static uint64_t NOT(uint64_t x)
Definition: EmulateInstructionARM64.cpp:79
lldb::SBEnvironment
class LLDB_API SBEnvironment
Definition: SBDefines.h:39
lldb_private::ConstString::AsCString
const char * AsCString(const char *value_if_empty=nullptr) const
Get the string value as a C string.
Definition: ConstString.h:193
NSNumber_FormatFloat
static void NSNumber_FormatFloat(ValueObject &valobj, Stream &stream, float value, lldb::LanguageType lang)
Definition: Cocoa.cpp:391
EmulateInstructionARM64
Definition: EmulateInstructionARM64.h:17
ABIMacOSX_arm
Definition: ABIMacOSX_arm.h:15
lldb::eBasicTypeChar
@ eBasicTypeChar
Definition: lldb-enumerations.h:744
ReproducerProvider
ReproducerProvider
Definition: CommandObjectReproducer.cpp:27
lldb::SBFileSpecList
class LLDB_API SBFileSpecList
Definition: SBDefines.h:47
lldb::SBBroadcaster
class LLDB_API SBBroadcaster
Definition: SBDefines.h:27
EmulateInstructionMIPS64
Definition: EmulateInstructionMIPS64.h:26
lldb_private::Stream
Definition: Stream.h:28
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
Language.h
DynamicLoaderMacOS
Definition: DynamicLoaderMacOS.h:31
StringExtractor
Definition: StringExtractor.h:19
lldb::SBStringList
class LLDB_API SBStringList
Definition: SBDefines.h:69
PlatformRemoteDarwinDevice
Definition: PlatformRemoteDarwinDevice.h:19
DWARFDebugInfoEntry
DWARFDebugInfoEntry objects assume that they are living in one big vector and do pointer arithmetic o...
Definition: DWARFDebugInfoEntry.h:31
ABIMacOSX_i386
Definition: ABIMacOSX_i386.h:16
RegisterContextNetBSD_x86_64
Definition: RegisterContextNetBSD_x86_64.h:14
DWARFDebugArangeSet
Definition: DWARFDebugArangeSet.h:16
DynamicLoaderDarwinKernelProperties
Definition: DynamicLoaderDarwinKernel.cpp:98
ObjectContainerUniversalMachO
Definition: ObjectContainerUniversalMachO.h:16
lldb::SBCommunication
class LLDB_API SBCommunication
Definition: SBDefines.h:34
RegisterContextDarwin_arm64
Definition: RegisterContextDarwin_arm64.h:28
lldb::SBType
class LLDB_API SBType
Definition: SBDefines.h:79
CFCString
Definition: CFCString.h:16
lldb_private::StreamString::GetString
llvm::StringRef GetString() const
Definition: StreamString.cpp:51
lldb::SBSymbolContext
class LLDB_API SBSymbolContext
Definition: SBDefines.h:72
RegisterInfoPOSIX_arm
Definition: RegisterInfoPOSIX_arm.h:16
PlatformDarwin
Definition: PlatformDarwin.h:25
Process.h
lldb_private::formatters::ObjCClassSyntheticFrontEndCreator
SyntheticChildrenFrontEnd * ObjCClassSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: Cocoa.cpp:979
RegisterInfoPOSIX_arm64
Definition: RegisterInfoPOSIX_arm64.h:20
RegisterContextPOSIX_ppc64le
Definition: RegisterContextPOSIX_ppc64le.h:18
lldb_private::formatters::NSStringSummaryProvider
bool NSStringSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: NSString.cpp:52
DWARFDIE
Definition: DWARFDIE.h:16
lldb::SBSourceManager
class LLDB_API SBSourceManager
Definition: SBDefines.h:67
SystemRuntimeMacOSX
Definition: SystemRuntimeMacOSX.h:31
lldb_private::ValueObject::GetChildAtIndex
virtual lldb::ValueObjectSP GetChildAtIndex(size_t idx, bool can_create)
Definition: ValueObject.cpp:375
Target.h
lldb_private::ValueObject::GetProcessSP
lldb::ProcessSP GetProcessSP() const
Definition: ValueObject.h:338
NSNumber_FormatShort
static void NSNumber_FormatShort(ValueObject &valobj, Stream &stream, short value, lldb::LanguageType lang)
Definition: Cocoa.cpp:321
lldb_private::TypeSummaryOptions::GetLanguage
lldb::LanguageType GetLanguage() const
Definition: TypeSummary.cpp:31
endif
LLDBWrapPython cpp endif() if(LLDB_ENABLE_LUA) get_target_property(lua_bindings_dir swig_wrapper_lua BINARY_DIR) set(lldb_lua_wrapper $
Definition: API/CMakeLists.txt:15
lldb_private::Log::Printf
void Printf(const char *format,...) __attribute__((format(printf
Prefer using LLDB_LOGF whenever possible.
Definition: Log.cpp:122
ObjectFilePECOFF
Definition: ObjectFilePECOFF.h:17
RegisterContextPOSIX_arm
Definition: RegisterContextPOSIX_arm.h:17
DWARFCompileUnit
Definition: DWARFCompileUnit.h:15
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
ProcessMachCore
Definition: ProcessMachCore.h:21
lldb_private::StreamString::GetSize
size_t GetSize() const
Definition: StreamString.cpp:38
PlatformPOSIX
Definition: PlatformPOSIX.h:18
RegisterNumber
A class to represent register numbers, and able to convert between different register numbering schem...
Definition: RegisterNumber.h:19
arm64_dwarf::x8
@ x8
Definition: ARM64_DWARF_Registers.h:25
DWARFUnit
Definition: DWARFUnit.h:80
ABISysV_ppc64
Definition: ABISysV_ppc64.h:15
DynamicLoaderHexagonDYLD
Definition: DynamicLoaderHexagonDYLD.h:17
else
else() list(APPEND LLVM_OPTIONAL_SOURCES $
Definition: Plugins/Platform/MacOSX/CMakeLists.txt:30
lldb::SBModuleSpec
class LLDB_API SBModuleSpec
Definition: SBDefines.h:60
decodeExponent
static uint64_t decodeExponent(uint64_t exp)
Definition: Cocoa.cpp:799
lldb::SBVariablesOptions
class LLDB_API SBVariablesOptions
Definition: SBDefines.h:93
lldb_private::breakpad::toString
llvm::StringRef toString(Record::Kind K)
Definition: BreakpadRecords.cpp:483
lldb_private::DataExtractor
Definition: DataExtractor.h:48
RegisterContextNetBSD_i386
Definition: RegisterContextNetBSD_i386.h:14
lldb::SBWatchpoint
class LLDB_API SBWatchpoint
Definition: SBDefines.h:94
lldb_private::ValueObject::Dereference
virtual lldb::ValueObjectSP Dereference(Status &error)
Definition: ValueObject.cpp:2630
lldb_private::formatters::NSDataSummaryProvider< false >
template bool NSDataSummaryProvider< false >(ValueObject &, Stream &, const TypeSummaryOptions &)
TypeSystemClang.h
lldb_private::ConstString::IsEmpty
bool IsEmpty() const
Test for empty string.
Definition: ConstString.h:304
AuxVector
Definition: AuxVector.h:16
lldb::SBProcessInfo
class LLDB_API SBProcessInfo
Definition: SBDefines.h:63
lldb_private::formatters::NSDecimalNumberSummaryProvider
bool NSDecimalNumberSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: Cocoa.cpp:650
lldb_private::ValueObject::GetSP
lldb::ValueObjectSP GetSP()
Definition: ValueObject.h:555
NSNumber_FormatInt128
static void NSNumber_FormatInt128(ValueObject &valobj, Stream &stream, const llvm::APInt &value, lldb::LanguageType lang)
Definition: Cocoa.cpp:369
lldb_private::Status::Fail
bool Fail() const
Test for error condition.
Definition: Status.cpp:182
ABIX86
Definition: ABIX86.h:14
DisassemblerLLVMC
Definition: DisassemblerLLVMC.h:22
lldb_private::StreamString::Clear
void Clear()
Definition: StreamString.cpp:31
lldb_private::StreamString::GetData
const char * GetData() const
Definition: StreamString.h:43
ABIMacOSX_arm64
Definition: ABIMacOSX_arm64.h:16
RegisterContextOpenBSD_i386
Definition: RegisterContextOpenBSD_i386.h:14
lldb_private::formatters::NSDataSummaryProvider< true >
template bool NSDataSummaryProvider< true >(ValueObject &, Stream &, const TypeSummaryOptions &)
lldb_private::ObjCLanguageRuntime::GetClassDescriptor
virtual ClassDescriptorSP GetClassDescriptor(ValueObject &in_value)
Definition: ObjCLanguageRuntime.cpp:235
PlatformDarwinKernel
Definition: PlatformDarwinKernel.h:224
DynamicLoaderDarwinKernel
Definition: DynamicLoaderDarwinKernel.h:24
lldb::SBFrame
class LLDB_API SBFrame
Definition: SBDefines.h:48
lldb_private::ConstString
Definition: ConstString.h:40
SymbolFileDWARFDebugMap
Definition: SymbolFileDWARFDebugMap.h:25
lldb::SBBreakpointName
class LLDB_API SBBreakpointName
Definition: SBDefines.h:25
lldb_private::formatters::NSTimeZoneSummaryProvider
bool NSTimeZoneSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: Cocoa.cpp:90
ABISysV_arc
Definition: ABISysV_arc.h:19
lldb_private::StreamString
Definition: StreamString.h:23
lldb::SBProcess
class LLDB_API SBProcess
Definition: SBDefines.h:62
lldb::SBTypeNameSpecifier
class LLDB_API SBTypeNameSpecifier
Definition: SBDefines.h:86
lldb::SBHostOS
class LLDB_API SBHostOS
Definition: SBDefines.h:50
lldb::SBTypeEnumMember
class LLDB_API SBTypeEnumMember
Definition: SBDefines.h:81
lldb::SBFile
class LLDB_API SBFile
Definition: SBDefines.h:45
ABISysV_x86_64
Definition: ABISysV_x86_64.h:14
TaggedDoubleBits::exponent
uint64_t exponent
Definition: Cocoa.cpp:794
lldb_private::formatters::NSIndexSetSummaryProvider
bool NSIndexSetSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: Cocoa.cpp:234
set
set(LLDB_SYSTEM_LIBS) if(APPLE) list(APPEND LLDB_SYSTEM_LIBS $
Definition: Utility/CMakeLists.txt:1
TaggedDoubleBits::fraction
uint64_t fraction
Definition: Cocoa.cpp:793
lldb_private::formatters::NSMachPortSummaryProvider
bool NSMachPortSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: Cocoa.cpp:188
DWARFFormValue
Definition: DWARFFormValue.h:20
lldb_private::GetLogIfAllCategoriesSet
Log * GetLogIfAllCategoriesSet(uint32_t mask)
Definition: Logging.cpp:58
elf
Definition: ELFHeader.h:32
if
if(CMAKE_SYSTEM_NAME MATCHES "Windows") add_definitions(-DEXPORT_LIBLLDB) endif() get_property(LLDB_ALL_PLUGINS GLOBAL PROPERTY LLDB_PLUGINS) if(LLDB_BUILD_FRAMEWORK) set(option_install_prefix INSTALL_PREFIX $
Definition: API/CMakeLists.txt:1
lldb_private::ValueObject::GetSyntheticChildAtOffset
virtual lldb::ValueObjectSP GetSyntheticChildAtOffset(uint32_t offset, const CompilerType &type, bool can_create, ConstString name_const_str=ConstString())
Definition: ValueObject.cpp:1676
ABIARM
Definition: ABIARM.h:12
lldb_private::AppleObjCRuntime
Definition: AppleObjCRuntime.h:23
lldb::SBExpressionOptions
class LLDB_API SBExpressionOptions
Definition: SBDefines.h:44
IRInterpreter
Definition: IRInterpreter.h:35
DoubleBits::fraction
uint64_t fraction
Definition: Cocoa.cpp:787
include_directories
include_directories(.) set(lldbBase_SOURCES lldb.cpp) find_first_existing_vc_file("$
Definition: CMakeLists.txt:1
SymbolVendorMacOSX
Definition: SymbolVendorMacOSX.h:15
ABISysV_mips64
Definition: ABISysV_mips64.h:15
lldb_private::ValueObject::GetExecutionContextRef
const ExecutionContextRef & GetExecutionContextRef() const
Definition: ValueObject.h:330
lldb_private::DumpRegisterValue
bool DumpRegisterValue(const RegisterValue &reg_val, Stream *s, const RegisterInfo *reg_info, bool prefix_with_name, bool prefix_with_alt_name, lldb::Format format, uint32_t reg_name_right_align_at=0)
Definition: DumpRegisterValue.cpp:18
lldb_private::StreamString::Empty
bool Empty() const
Definition: StreamString.cpp:36
CommunicationKDP
Definition: CommunicationKDP.h:22
set
set(option_framework FRAMEWORK) endif() if(LLDB_ENABLE_PYTHON) get_target_property(python_bindings_dir swig_wrapper_python BINARY_DIR) set(lldb_python_wrapper $
Definition: API/CMakeLists.txt:9
DWARFDebugRanges
Definition: DWARFDebugRanges.h:20
lldb::SBInstruction
class LLDB_API SBInstruction
Definition: SBDefines.h:51
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:39
HexagonDYLDRendezvous
Definition: HexagonDYLDRendezvous.h:31
LIBLLDB_LOG_DATAFORMATTERS
#define LIBLLDB_LOG_DATAFORMATTERS
Definition: Logging.h:43
RegisterContextPOSIX_s390x
Definition: RegisterContextPOSIX_s390x.h:18
UnwindAssemblyInstEmulation
Definition: UnwindAssemblyInstEmulation.h:18
DoubleBits::exponent
uint64_t exponent
Definition: Cocoa.cpp:788
RegisterContextLinux_i386
Definition: RegisterContextLinux_i386.h:14
lldb::SBBreakpoint
class LLDB_API SBBreakpoint
Definition: SBDefines.h:23
if
if(CMAKE_SYSTEM_NAME MATCHES "Linux|Android|FreeBSD|NetBSD") list(APPEND EXTRA_PLUGINS lldbPluginProcessPOSIX) endif() if(CMAKE_SYSTEM_NAME MATCHES "Windows") list(APPEND EXTRA_PLUGINS lldbPluginProcessWindowsCommon) endif() add_lldb_library(lldbInitialization SystemInitializerCommon.cpp SystemInitializer.cpp SystemLifetimeManager.cpp LINK_LIBS lldbCore lldbHost lldbPluginProcessGDBRemote $
Definition: Initialization/CMakeLists.txt:1
lldb::SBCommandReturnObject
class LLDB_API SBCommandReturnObject
Definition: SBDefines.h:33
RegisterContextKDP_arm
Definition: RegisterContextKDP_arm.h:16
RegisterContextWindows_i386
Definition: RegisterContextWindows_i386.h:14
lldb_private::VASprintf
bool VASprintf(llvm::SmallVectorImpl< char > &buf, const char *fmt, va_list args)
Definition: VASprintf.cpp:19
ABISysV_s390x
Definition: ABISysV_s390x.h:15
ABIAArch64
Definition: ABIAArch64.h:14
ThreadKDP
Definition: ThreadKDP.h:19
RegisterInfoPOSIX_ppc64le
Definition: RegisterInfoPOSIX_ppc64le.h:16
RegisterContextKDP_arm64
Definition: RegisterContextKDP_arm64.h:17
CFCBundle
Definition: CFCBundle.h:14
ValueObject.h
RegisterContextPOSIX_powerpc
Definition: RegisterContextPOSIX_powerpc.h:138
CFCData
Definition: CFCData.h:14
lldb::SBSection
class LLDB_API SBSection
Definition: SBDefines.h:66
lldb::SBLaunchInfo
class LLDB_API SBLaunchInfo
Definition: SBDefines.h:54
lldb_private::formatters::NSURLSummaryProvider
bool NSURLSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: Cocoa.cpp:699
Time.h
RegisterContextKDP_i386
Definition: RegisterContextKDP_i386.h:16
DWARFDebugAbbrev
Definition: DWARFDebugAbbrev.h:64
lldb::SBThread
class LLDB_API SBThread
Definition: SBDefines.h:75
ObjCClassSyntheticChildrenFrontEnd::MightHaveChildren
bool MightHaveChildren() override
Definition: Cocoa.cpp:971
ValueObjectConstResult.h
RegisterContextWindows_x86_64
Definition: RegisterContextWindows_x86_64.h:14
lldb::SBData
class LLDB_API SBData
Definition: SBDefines.h:36
RegisterContextMemory
Definition: RegisterContextMemory.h:20
lldb::eBasicTypeObjCID
@ eBasicTypeObjCID
Definition: lldb-enumerations.h:770
lldb::SBSymbolContextList
class LLDB_API SBSymbolContextList
Definition: SBDefines.h:73
NSNumber_FormatInt
static void NSNumber_FormatInt(ValueObject &valobj, Stream &stream, int value, lldb::LanguageType lang)
Definition: Cocoa.cpp:337
lldb_private::formatters::ObjCSELSummaryProvider< true >
template bool ObjCSELSummaryProvider< true >(ValueObject &, Stream &, const TypeSummaryOptions &)
ProcessStructReader.h
RegisterContextDarwin_i386
Definition: RegisterContextDarwin_i386.h:15
DWARFASTParserClang
Definition: DWARFASTParserClang.h:37
ABIMips
Definition: ABIMips.h:12
EmulationStateARM
Definition: EmulationStateARM.h:17
lldb::SBSymbol
class LLDB_API SBSymbol
Definition: SBDefines.h:71
NSNumber_FormatChar
static void NSNumber_FormatChar(ValueObject &valobj, Stream &stream, char value, lldb::LanguageType lang)
Definition: Cocoa.cpp:305
PlatformRemoteiOS
Definition: PlatformRemoteiOS.h:19
lldb_private::Status
Definition: Status.h:44
lldb_private::ValueObject
ValueObject:
Definition: ValueObject.h:105
lldb_private::CompilerType::GetPointerType
CompilerType GetPointerType() const
Return a new CompilerType that is a pointer to this type.
Definition: CompilerType.cpp:407
TypeSummary.h
lldb::SBUnixSignals
class LLDB_API SBUnixSignals
Definition: SBDefines.h:95
DoubleBits
Definition: Cocoa.cpp:786
uint32_t
message
message(FATAL_ERROR "invalid libipt include path provided") endif() include_directories($
Definition: Plugins/Trace/intel-pt/CMakeLists.txt:6
lldb::SBCompileUnit
class LLDB_API SBCompileUnit
Definition: SBDefines.h:35
lldb_private::Language
Definition: Language.h:29
lldb::SBTypeCategory
class LLDB_API SBTypeCategory
Definition: SBDefines.h:80
ObjCClassSyntheticChildrenFrontEnd::Update
bool Update() override
Definition: Cocoa.cpp:969
lldb::SBThreadPlan
class LLDB_API SBThreadPlan
Definition: SBDefines.h:77
lldb_private::formatters::ObjCSELSummaryProvider
bool ObjCSELSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: Cocoa.cpp:1109
DynamicRegisterInfo
Definition: DynamicRegisterInfo.h:19
PlatformRemoteAppleBridge
Definition: PlatformRemoteAppleBridge.h:20
SymbolFileSymtab
Definition: SymbolFileSymtab.h:18
lldb_private::AppleObjCRuntime::GetFoundationVersion
uint32_t GetFoundationVersion()
Definition: AppleObjCRuntime.cpp:320
PDBASTParser
Definition: PDBASTParser.h:43
lldb::SBStream
class LLDB_API SBStream
Definition: SBDefines.h:68
lldb::SBTrace
class LLDB_API SBTrace
Definition: SBDefines.h:78
DYLDRendezvous
Definition: DYLDRendezvous.h:34
lldb::SBTarget
class LLDB_API SBTarget
Definition: SBDefines.h:74
lldb::SBEvent
class LLDB_API SBEvent
Definition: SBDefines.h:41
lldb_private::CompilerType::GetTypeInfo
uint32_t GetTypeInfo(CompilerType *pointee_or_element_compiler_type=nullptr) const
Definition: CompilerType.cpp:290
lldb_private::formatters::NSNotificationSummaryProvider
bool NSNotificationSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: Cocoa.cpp:139
UINT32_MAX
#define UINT32_MAX
Definition: lldb-defines.h:31
remove_module_flags
remove_module_flags() include_directories(.) add_lldb_library(lldbPluginPlatformMacOSXObjCXX PlatformiOSSimulatorCoreSimulatorSupport.mm LINK_LIBS lldbCore lldbSymbol lldbTarget lldbUtility $
Definition: Plugins/Platform/MacOSX/objcxx/CMakeLists.txt:1
lldb::SBTypeFormat
class LLDB_API SBTypeFormat
Definition: SBDefines.h:84
SymbolFileDWARFDwo
Definition: SymbolFileDWARFDwo.h:14
lldb_private::ValueObject::GetCompilerType
CompilerType GetCompilerType()
Definition: ValueObject.h:352
lldb::SBValue
class LLDB_API SBValue
Definition: SBDefines.h:91
RegisterContextDarwin_x86_64
Definition: RegisterContextDarwin_x86_64.h:15
lldb_private::formatters::GetOSXEpoch
time_t GetOSXEpoch()
Definition: Cocoa.cpp:1147
if
if(APPLE AND LLVM_ENABLE_LOCAL_SUBMODULE_VISIBILITY) remove_module_flags() endif() macro(add_host_subdirectory group) list(APPEND HOST_SOURCES $
Definition: Host/CMakeLists.txt:1
lldb_private::TypeSummaryOptions
Definition: TypeSummary.h:26
ObjectFileELF
Definition: ObjectFileELF.h:57
lldb::SBFunction
class LLDB_API SBFunction
Definition: SBDefines.h:49
RegisterContextMach_arm
Definition: RegisterContextMach_arm.h:14
lldb_private::formatters::NSBundleSummaryProvider
bool NSBundleSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: Cocoa.cpp:39
ObjCClassSyntheticChildrenFrontEnd::CalculateNumChildren
size_t CalculateNumChildren() override
Definition: Cocoa.cpp:963
ObjCClassSyntheticChildrenFrontEnd::GetIndexOfChildWithName
size_t GetIndexOfChildWithName(ConstString name) override
Definition: Cocoa.cpp:973
LLDB_INVALID_ADDRESS
#define LLDB_INVALID_ADDRESS
Definition: lldb-defines.h:86
JITLoaderGDB
Definition: JITLoaderGDB.h:17
DoubleBits::sign
uint64_t sign
Definition: Cocoa.cpp:789
lldb_private::formatters::ObjCBooleanSummaryProvider
bool ObjCBooleanSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: Cocoa.cpp:1079
DWARFAbbreviationDeclaration
Definition: DWARFAbbreviationDeclaration.h:17
clang
Definition: ASTResultSynthesizer.h:15
lldb_private::CompilerType::GetBasicTypeFromAST
CompilerType GetBasicTypeFromAST(lldb::BasicType basic_type) const
Create related types using the current type's AST.
Definition: CompilerType.cpp:474
lldb_private::CompilerType
Generic representation of a type in a programming language.
Definition: CompilerType.h:33
lldb_private::Stream::Printf
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
Definition: Stream.cpp:107
DynamicLoaderStatic
Definition: DynamicLoaderStatic.h:17
DWARFAttribute
Definition: DWARFAttribute.h:19
lldb::SBLanguageRuntime
class LLDB_API SBLanguageRuntime
Definition: SBDefines.h:53
lldb_private::DumpDataExtractor
lldb::offset_t DumpDataExtractor(const DataExtractor &DE, Stream *s, lldb::offset_t offset, lldb::Format item_format, size_t item_byte_size, size_t item_count, size_t num_per_line, uint64_t base_addr, uint32_t item_bit_size, uint32_t item_bit_offset, ExecutionContextScope *exe_scope=nullptr)
Dumps item_count objects into the stream s.
Definition: DumpDataExtractor.cpp:256
lldb::SBQueueItem
class LLDB_API SBQueueItem
Definition: SBDefines.h:65
NSNumber_FormatLong
static void NSNumber_FormatLong(ValueObject &valobj, Stream &stream, int64_t value, lldb::LanguageType lang)
Definition: Cocoa.cpp:353
Status.h
lldb_private::formatters
Definition: CXXFunctionPointer.h:15
NSString.h
DWARFDeclContext
Definition: DWARFDeclContext.h:23
decodeTaggedTimeInterval
static double decodeTaggedTimeInterval(uint64_t encodedTimeInterval)
Definition: Cocoa.cpp:805
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
IRForTarget
Definition: IRForTarget.h:61
SymbolVendorELF
Definition: SymbolVendorELF.h:15
ObjectFileMachO
Definition: ObjectFileMachO.h:23
RegisterContextFreeBSD_mips64
Definition: RegisterContextFreeBSD_mips64.h:14
ObjCClassSyntheticChildrenFrontEnd::GetChildAtIndex
lldb::ValueObjectSP GetChildAtIndex(size_t idx) override
Definition: Cocoa.cpp:965
CFCMutableArray
Definition: CFCMutableArray.h:14
lldb::SBCommandInterpreter
class LLDB_API SBCommandInterpreter
Definition: SBDefines.h:29
RegisterContextMach_x86_64
Definition: RegisterContextMach_x86_64.h:15
ProcessMessage
Definition: ProcessMessage.h:20
StringConvert
endif
Wno gnu anonymous struct endif() if(CXX_SUPPORTS_NO_NESTED_ANON_TYPES) set(EXTRA_CXXFLAGS $
Definition: Plugins/Language/ObjC/CMakeLists.txt:5
lldb_tablegen
lldb_tablegen(InterpreterProperties.inc -gen-lldb-property-defs SOURCE InterpreterProperties.td TARGET LLDBInterpreterPropertiesGen) lldb_tablegen(InterpreterPropertiesEnum.inc -gen-lldb-property-enum-defs SOURCE InterpreterProperties.td TARGET LLDBInterpreterPropertiesEnumGen) add_lldb_library(lldbInterpreter CommandAlias.cpp CommandHistory.cpp CommandInterpreter.cpp CommandObject.cpp CommandOptionValidators.cpp CommandReturnObject.cpp OptionArgParser.cpp OptionGroupArchitecture.cpp OptionGroupBoolean.cpp OptionGroupFile.cpp OptionGroupFormat.cpp OptionGroupPythonClassWithDict.cpp OptionGroupOutputFile.cpp OptionGroupPlatform.cpp OptionGroupString.cpp OptionGroupUInt64.cpp OptionGroupUUID.cpp OptionGroupValueObjectDisplay.cpp OptionValue.cpp OptionValueArch.cpp OptionValueArgs.cpp OptionValueArray.cpp OptionValueBoolean.cpp OptionValueChar.cpp OptionValueDictionary.cpp OptionValueEnumeration.cpp OptionValueFileColonLine.cpp OptionValueFileSpec.cpp OptionValueFileSpecList.cpp OptionValueFormat.cpp OptionValueFormatEntity.cpp OptionValueLanguage.cpp OptionValuePathMappings.cpp OptionValueProperties.cpp OptionValueRegex.cpp OptionValueSInt64.cpp OptionValueString.cpp OptionValueUInt64.cpp OptionValueUUID.cpp OptionGroupVariable.cpp OptionGroupWatchpoint.cpp Options.cpp Property.cpp ScriptInterpreter.cpp LINK_LIBS lldbCommands lldbCore lldbDataFormatters lldbHost lldbTarget lldbUtility LINK_COMPONENTS Support) add_dependencies(lldbInterpreter LLDBInterpreterPropertiesGen LLDBInterpreterPropertiesEnumGen) if(LLDB_ENABLE_LIBEDIT) target_include_directories(lldbInterpreter PRIVATE $
Definition: Interpreter/CMakeLists.txt:1
ABISysV_arm
Definition: ABISysV_arm.h:15
lldb::SBExecutionContext
class LLDB_API SBExecutionContext
Definition: SBDefines.h:43
ObjCClassSyntheticChildrenFrontEnd::ObjCClassSyntheticChildrenFrontEnd
ObjCClassSyntheticChildrenFrontEnd(lldb::ValueObjectSP valobj_sp)
Definition: Cocoa.cpp:958
StringExtractorGDBRemote
Definition: StringExtractorGDBRemote.h:21
StringPrinter.h
ProcessElfCore
Definition: ProcessElfCore.h:31
CrashReason
CrashReason
Definition: CrashReason.h:18
RegisterContextMach_i386
Definition: RegisterContextMach_i386.h:14
RegisterContextFreeBSD_i386
Definition: RegisterContextFreeBSD_i386.h:14
ABISysV_ppc
Definition: ABISysV_ppc.h:15
lldb::SBTypeFilter
class LLDB_API SBTypeFilter
Definition: SBDefines.h:83
Stream.h
lldb_private::Log
Definition: Log.h:49
lldb_private::Stream::PutCString
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
Definition: Stream.cpp:63
ABISysV_i386
Definition: ABISysV_i386.h:15
Cocoa.h
lldb::SBModule
class LLDB_API SBModule
Definition: SBDefines.h:59
lldb_private::CXXSyntheticChildren
Definition: TypeSynthetic.h:358
RegisterContextPOSIX_x86
Definition: RegisterContextPOSIX_x86.h:18
lldb::SBBreakpointLocation
class LLDB_API SBBreakpointLocation
Definition: SBDefines.h:24
lldb::SBAddress
class LLDB_API SBAddress
Definition: SBDefines.h:21
find_package
find_package(Lua REQUIRED) add_lldb_library(lldbPluginScriptInterpreterLua PLUGIN Lua.cpp ScriptInterpreterLua.cpp LINK_LIBS lldbCore lldbInterpreter) target_include_directories(lldbPluginScriptInterpreterLua PUBLIC $
Definition: Plugins/ScriptInterpreter/Lua/CMakeLists.txt:1
FormattersHelpers.h
ABISysV_arm64
Definition: ABISysV_arm64.h:15
TaggedDoubleBits::sign
uint64_t sign
Definition: Cocoa.cpp:795
PlatformMacOSX
Definition: PlatformMacOSX.h:14
set
MATCHES ScriptInterpreter * set(LLDB_ENUM_PLUGINS "${LLDB_ENUM_PLUGINS}LLDB_SCRIPT_PLUGIN(${pStripped})\n") elseif($
Definition: Plugins/CMakeLists.txt:41
lldb
Definition: SBAddress.h:15
endif
endif() add_lldb_library(lldbPluginPlatformMacOSX PLUGIN $
Definition: Plugins/Platform/MacOSX/CMakeLists.txt:33
CFCMutableDictionary
Definition: CFCMutableDictionary.h:14
Endian.h
lldb::SBFileSpec
class LLDB_API SBFileSpec
Definition: SBDefines.h:46
lldb_tablegen
lldb_tablegen(PlatformMacOSXProperties.inc -gen-lldb-property-defs SOURCE PlatformMacOSXProperties.td TARGET LLDBPluginPlatformMacOSXPropertiesGen) lldb_tablegen(PlatformMacOSXPropertiesEnum.inc -gen-lldb-property-enum-defs SOURCE PlatformMacOSXProperties.td TARGET LLDBPluginPlatformMacOSXPropertiesEnumGen) list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES PlatformDarwin.cpp PlatformDarwinKernel.cpp PlatformMacOSX.cpp PlatformRemoteAppleBridge.cpp PlatformRemoteAppleTV.cpp PlatformRemoteAppleWatch.cpp PlatformRemoteDarwinDevice.cpp PlatformRemoteMacOSX.cpp PlatformRemoteiOS.cpp) list(APPEND PLUGIN_PLATFORM_MACOSX_DARWIN_ONLY_SOURCES PlatformAppleSimulator.cpp) if(CMAKE_SYSTEM_NAME MATCHES "Darwin") add_subdirectory(objcxx) set(OBJC_LIBS "lldbPluginPlatformMacOSXObjCXX") list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES $
Definition: Plugins/Platform/MacOSX/CMakeLists.txt:1
NameToDIE
Definition: NameToDIE.h:21
ThreadElfCore
Definition: ThreadElfCore.h:135
AppleObjCRuntime.h
EmulateInstructionMIPS
Definition: EmulateInstructionMIPS.h:30
lldb::SBValueList
class LLDB_API SBValueList
Definition: SBDefines.h:92
ABIPowerPC
Definition: ABIPowerPC.h:12
RegisterContextPOSIX_arm64
Definition: RegisterContextPOSIX_arm64.h:17
lldb_private::NameMatches
bool NameMatches(llvm::StringRef name, NameMatch match_type, llvm::StringRef match)
Definition: NameMatches.cpp:15
DataBufferHeap.h
RegisterContextDarwin_arm
Definition: RegisterContextDarwin_arm.h:46
RegisterContextFreeBSD_x86_64
Definition: RegisterContextFreeBSD_x86_64.h:14
ABISysV_mips
Definition: ABISysV_mips.h:15
lldb_private::formatters::NSDataSummaryProvider
bool NSDataSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: Cocoa.cpp:985
RegisterContextLinux_s390x
Definition: RegisterContextLinux_s390x.h:14
lldb::SBInstructionList
class LLDB_API SBInstructionList
Definition: SBDefines.h:52
lldb::SBMemoryRegionInfo
class LLDB_API SBMemoryRegionInfo
Definition: SBDefines.h:57
DWARFBaseDIE
Definition: DWARFBaseDIE.h:25
DynamicLoaderMacOSXDYLD
Definition: DynamicLoaderMacOSXDYLD.h:35
set
lldb_vc set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSVersion.inc") set(generate_vcs_version_script "$
Definition: CMakeLists.txt:10