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 #include "NSString.h"
11 #include "ObjCConstants.h"
12 
15 #include "lldb/Core/Mangled.h"
16 #include "lldb/Core/ValueObject.h"
21 #include "lldb/Host/Time.h"
22 #include "lldb/Target/Language.h"
23 #include "lldb/Target/Process.h"
25 #include "lldb/Target/Target.h"
27 #include "lldb/Utility/Endian.h"
28 #include "lldb/Utility/Status.h"
29 #include "lldb/Utility/Stream.h"
30 
31 #include "llvm/ADT/APInt.h"
32 #include "llvm/ADT/bit.h"
33 
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 == "NSConstantIntegerNumber") {
460  Status error;
461  int64_t value = process_sp->ReadSignedIntegerFromMemory(
462  valobj_addr + 2 * ptr_size, 8, 0, error);
463  if (error.Fail())
464  return false;
465  uint64_t encoding_addr = process_sp->ReadUnsignedIntegerFromMemory(
466  valobj_addr + ptr_size, ptr_size, 0, error);
467  if (error.Fail())
468  return false;
469  char encoding =
470  process_sp->ReadUnsignedIntegerFromMemory(encoding_addr, 1, 0, error);
471  if (error.Fail())
472  return false;
473 
474  switch (encoding) {
475  case _C_CHR:
476  NSNumber_FormatChar(valobj, stream, (char)value, options.GetLanguage());
477  return true;
478  case _C_SHT:
479  NSNumber_FormatShort(valobj, stream, (short)value, options.GetLanguage());
480  return true;
481  case _C_INT:
482  NSNumber_FormatInt(valobj, stream, (int)value, options.GetLanguage());
483  return true;
484  case _C_LNG:
485  case _C_LNG_LNG:
486  NSNumber_FormatLong(valobj, stream, value, options.GetLanguage());
487  return true;
488 
489  case _C_UCHR:
490  case _C_USHT:
491  case _C_UINT:
492  case _C_ULNG:
493  case _C_ULNG_LNG:
494  stream.Printf("%" PRIu64, value);
495  return true;
496  }
497 
498  return false;
499  }
500 
501  if (class_name == "NSConstantFloatNumber") {
502  Status error;
503  uint32_t flt_as_int = process_sp->ReadUnsignedIntegerFromMemory(
504  valobj_addr + ptr_size, 4, 0, error);
505  if (error.Fail())
506  return false;
507  float flt_value = 0.0f;
508  memcpy(&flt_value, &flt_as_int, sizeof(flt_as_int));
509  NSNumber_FormatFloat(valobj, stream, flt_value, options.GetLanguage());
510  return true;
511  }
512 
513  if (class_name == "NSConstantDoubleNumber") {
514  Status error;
515  uint64_t dbl_as_lng = process_sp->ReadUnsignedIntegerFromMemory(
516  valobj_addr + ptr_size, 8, 0, error);
517  if (error.Fail())
518  return false;
519  double dbl_value = 0.0;
520  memcpy(&dbl_value, &dbl_as_lng, sizeof(dbl_as_lng));
521  NSNumber_FormatDouble(valobj, stream, dbl_value, options.GetLanguage());
522  return true;
523  }
524 
525  if (class_name == "NSNumber" || class_name == "__NSCFNumber") {
526  int64_t value = 0;
527  uint64_t i_bits = 0;
528  if (descriptor->GetTaggedPointerInfoSigned(&i_bits, &value)) {
529  // Check for "preserved" numbers. We still don't support them yet.
530  if (i_bits & 0x8) {
531  if (log)
532  log->Printf(
533  "Unsupported (preserved) NSNumber tagged pointer 0x%" PRIu64,
534  valobj_addr);
535  return false;
536  }
537 
538  switch (i_bits) {
539  case 0:
540  NSNumber_FormatChar(valobj, stream, (char)value, options.GetLanguage());
541  break;
542  case 1:
543  case 4:
544  NSNumber_FormatShort(valobj, stream, (short)value,
545  options.GetLanguage());
546  break;
547  case 2:
548  case 8:
549  NSNumber_FormatInt(valobj, stream, (int)value, options.GetLanguage());
550  break;
551  case 3:
552  case 12:
553  NSNumber_FormatLong(valobj, stream, value, options.GetLanguage());
554  break;
555  default:
556  return false;
557  }
558  return true;
559  } else {
560  Status error;
561 
562  AppleObjCRuntime *runtime = llvm::dyn_cast_or_null<AppleObjCRuntime>(
563  ObjCLanguageRuntime::Get(*process_sp));
564 
565  const bool new_format =
566  (runtime && runtime->GetFoundationVersion() >= 1400);
567 
568  enum class TypeCodes : int {
569  sint8 = 0x0,
570  sint16 = 0x1,
571  sint32 = 0x2,
572  sint64 = 0x3,
573  f32 = 0x4,
574  f64 = 0x5,
575  sint128 = 0x6
576  };
577 
578  uint64_t data_location = valobj_addr + 2 * ptr_size;
579  TypeCodes type_code;
580 
581  if (new_format) {
582  uint64_t cfinfoa = process_sp->ReadUnsignedIntegerFromMemory(
583  valobj_addr + ptr_size, ptr_size, 0, error);
584 
585  if (error.Fail())
586  return false;
587 
588  bool is_preserved_number = cfinfoa & 0x8;
589  if (is_preserved_number) {
590  if (log)
591  log->Printf(
592  "Unsupported preserved NSNumber tagged pointer 0x%" PRIu64,
593  valobj_addr);
594  return false;
595  }
596 
597  type_code = static_cast<TypeCodes>(cfinfoa & 0x7);
598  } else {
599  uint8_t data_type = process_sp->ReadUnsignedIntegerFromMemory(
600  valobj_addr + ptr_size, 1, 0, error) &
601  0x1F;
602 
603  if (error.Fail())
604  return false;
605 
606  switch (data_type) {
607  case 1:
608  type_code = TypeCodes::sint8;
609  break;
610  case 2:
611  type_code = TypeCodes::sint16;
612  break;
613  case 3:
614  type_code = TypeCodes::sint32;
615  break;
616  case 17:
617  data_location += 8;
618  LLVM_FALLTHROUGH;
619  case 4:
620  type_code = TypeCodes::sint64;
621  break;
622  case 5:
623  type_code = TypeCodes::f32;
624  break;
625  case 6:
626  type_code = TypeCodes::f64;
627  break;
628  default:
629  return false;
630  }
631  }
632 
633  uint64_t value = 0;
634  bool success = false;
635  switch (type_code) {
636  case TypeCodes::sint8:
637  value = process_sp->ReadUnsignedIntegerFromMemory(data_location, 1, 0,
638  error);
639  if (error.Fail())
640  return false;
641  NSNumber_FormatChar(valobj, stream, (char)value, options.GetLanguage());
642  success = true;
643  break;
644  case TypeCodes::sint16:
645  value = process_sp->ReadUnsignedIntegerFromMemory(data_location, 2, 0,
646  error);
647  if (error.Fail())
648  return false;
649  NSNumber_FormatShort(valobj, stream, (short)value,
650  options.GetLanguage());
651  success = true;
652  break;
653  case TypeCodes::sint32:
654  value = process_sp->ReadUnsignedIntegerFromMemory(data_location, 4, 0,
655  error);
656  if (error.Fail())
657  return false;
658  NSNumber_FormatInt(valobj, stream, (int)value, options.GetLanguage());
659  success = true;
660  break;
661  case TypeCodes::sint64:
662  value = process_sp->ReadUnsignedIntegerFromMemory(data_location, 8, 0,
663  error);
664  if (error.Fail())
665  return false;
666  NSNumber_FormatLong(valobj, stream, value, options.GetLanguage());
667  success = true;
668  break;
669  case TypeCodes::f32: {
670  uint32_t flt_as_int = process_sp->ReadUnsignedIntegerFromMemory(
671  data_location, 4, 0, error);
672  if (error.Fail())
673  return false;
674  float flt_value = 0.0f;
675  memcpy(&flt_value, &flt_as_int, sizeof(flt_as_int));
676  NSNumber_FormatFloat(valobj, stream, flt_value, options.GetLanguage());
677  success = true;
678  break;
679  }
680  case TypeCodes::f64: {
681  uint64_t dbl_as_lng = process_sp->ReadUnsignedIntegerFromMemory(
682  data_location, 8, 0, error);
683  if (error.Fail())
684  return false;
685  double dbl_value = 0.0;
686  memcpy(&dbl_value, &dbl_as_lng, sizeof(dbl_as_lng));
687  NSNumber_FormatDouble(valobj, stream, dbl_value, options.GetLanguage());
688  success = true;
689  break;
690  }
691  case TypeCodes::sint128: // internally, this is the same
692  {
693  uint64_t words[2];
694  words[1] = process_sp->ReadUnsignedIntegerFromMemory(data_location, 8,
695  0, error);
696  if (error.Fail())
697  return false;
698  words[0] = process_sp->ReadUnsignedIntegerFromMemory(data_location + 8,
699  8, 0, error);
700  if (error.Fail())
701  return false;
702  llvm::APInt i128_value(128, words);
703  NSNumber_FormatInt128(valobj, stream, i128_value,
704  options.GetLanguage());
705  success = true;
706  break;
707  }
708  }
709  return success;
710  }
711  }
712 
713  return false;
714 }
715 
717  ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
718  ProcessSP process_sp = valobj.GetProcessSP();
719  if (!process_sp)
720  return false;
721 
722  lldb::addr_t valobj_addr = valobj.GetValueAsUnsigned(0);
723  uint32_t ptr_size = process_sp->GetAddressByteSize();
724 
725  Status error;
726  int8_t exponent = process_sp->ReadUnsignedIntegerFromMemory(
727  valobj_addr + ptr_size, 1, 0, error);
728  if (error.Fail())
729  return false;
730 
731  uint8_t length_and_negative = process_sp->ReadUnsignedIntegerFromMemory(
732  valobj_addr + ptr_size + 1, 1, 0, error);
733  if (error.Fail())
734  return false;
735 
736  // Fifth bit marks negativity.
737  const bool is_negative = (length_and_negative >> 4) & 1;
738 
739  // Zero length and negative means NaN.
740  uint8_t length = length_and_negative & 0xf;
741  const bool is_nan = is_negative && (length == 0);
742 
743  if (is_nan) {
744  stream.Printf("NaN");
745  return true;
746  }
747 
748  if (length == 0) {
749  stream.Printf("0");
750  return true;
751  }
752 
753  uint64_t mantissa = process_sp->ReadUnsignedIntegerFromMemory(
754  valobj_addr + ptr_size + 4, 8, 0, error);
755  if (error.Fail())
756  return false;
757 
758  if (is_negative)
759  stream.Printf("-");
760 
761  stream.Printf("%" PRIu64 " x 10^%" PRIi8, mantissa, exponent);
762  return true;
763 }
764 
766  ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
767  ProcessSP process_sp = valobj.GetProcessSP();
768  if (!process_sp)
769  return false;
770 
771  ObjCLanguageRuntime *runtime = ObjCLanguageRuntime::Get(*process_sp);
772 
773  if (!runtime)
774  return false;
775 
777  runtime->GetClassDescriptor(valobj));
778 
779  if (!descriptor || !descriptor->IsValid())
780  return false;
781 
782  uint32_t ptr_size = process_sp->GetAddressByteSize();
783 
784  lldb::addr_t valobj_addr = valobj.GetValueAsUnsigned(0);
785 
786  if (!valobj_addr)
787  return false;
788 
789  llvm::StringRef class_name = descriptor->GetClassName().GetStringRef();
790 
791  if (!class_name.equals("NSURL"))
792  return false;
793 
794  uint64_t offset_text = ptr_size + ptr_size +
795  8; // ISA + pointer + 8 bytes of data (even on 32bit)
796  uint64_t offset_base = offset_text + ptr_size;
797  CompilerType type(valobj.GetCompilerType());
798  ValueObjectSP text(valobj.GetSyntheticChildAtOffset(offset_text, type, true));
799  ValueObjectSP base(valobj.GetSyntheticChildAtOffset(offset_base, type, true));
800  if (!text || text->GetValueAsUnsigned(0) == 0)
801  return false;
802 
803  StreamString base_summary;
804  if (base && base->GetValueAsUnsigned(0)) {
805  if (!NSURLSummaryProvider(*base, base_summary, options))
806  base_summary.Clear();
807  }
808  if (base_summary.Empty())
809  return NSStringSummaryProvider(*text, stream, options);
810 
811  StreamString summary;
812  if (!NSStringSummaryProvider(*text, summary, options) || summary.Empty())
813  return false;
814 
815  const char quote_char = '"';
816  std::string prefix, suffix;
817  if (Language *language = Language::FindPlugin(options.GetLanguage())) {
818  if (!language->GetFormatterPrefixSuffix(*text, ConstString("NSString"),
819  prefix, suffix)) {
820  prefix.clear();
821  suffix.clear();
822  }
823  }
824  // @"A" -> @"A
825  llvm::StringRef summary_str = summary.GetString();
826  bool back_consumed = summary_str.consume_back(quote_char + suffix);
827  assert(back_consumed);
828  UNUSED_IF_ASSERT_DISABLED(back_consumed);
829  // @"B" -> B"
830  llvm::StringRef base_summary_str = base_summary.GetString();
831  bool front_consumed = base_summary_str.consume_front(prefix + quote_char);
832  assert(front_consumed);
833  UNUSED_IF_ASSERT_DISABLED(front_consumed);
834  // @"A -- B"
835  if (!summary_str.empty() && !base_summary_str.empty()) {
836  stream.Printf("%s -- %s", summary_str.str().c_str(),
837  base_summary_str.str().c_str());
838  return true;
839  }
840 
841  return false;
842 }
843 
844 /// Bias value for tagged pointer exponents.
845 /// Recommended values:
846 /// 0x3e3: encodes all dates between distantPast and distantFuture
847 /// except for the range within about 1e-28 second of the reference date.
848 /// 0x3ef: encodes all dates for a few million years beyond distantPast and
849 /// distantFuture, except within about 1e-25 second of the reference date.
850 const int TAGGED_DATE_EXPONENT_BIAS = 0x3ef;
851 
852 struct DoubleBits {
853  uint64_t fraction : 52; // unsigned
854  uint64_t exponent : 11; // signed
855  uint64_t sign : 1;
856 };
857 
859  uint64_t fraction : 52; // unsigned
860  uint64_t exponent : 7; // signed
861  uint64_t sign : 1;
862  uint64_t unused : 4; // placeholder for pointer tag bits
863 };
864 
865 static uint64_t decodeExponent(uint64_t exp) {
866  // Tagged exponent field is 7-bit signed. Sign-extend the value to 64 bits
867  // before performing arithmetic.
868  return llvm::SignExtend64<7>(exp) + TAGGED_DATE_EXPONENT_BIAS;
869 }
870 
871 static double decodeTaggedTimeInterval(uint64_t encodedTimeInterval) {
872  if (encodedTimeInterval == 0)
873  return 0.0;
874  if (encodedTimeInterval == std::numeric_limits<uint64_t>::max())
875  return (uint64_t)-0.0;
876 
877  TaggedDoubleBits encodedBits =
878  llvm::bit_cast<TaggedDoubleBits>(encodedTimeInterval);
879  assert(encodedBits.unused == 0);
880 
881  // Sign and fraction are represented exactly.
882  // Exponent is encoded.
883  DoubleBits decodedBits;
884  decodedBits.sign = encodedBits.sign;
885  decodedBits.fraction = encodedBits.fraction;
886  decodedBits.exponent = decodeExponent(encodedBits.exponent);
887 
888  return llvm::bit_cast<double>(decodedBits);
889 }
890 
892  ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
893  ProcessSP process_sp = valobj.GetProcessSP();
894  if (!process_sp)
895  return false;
896 
897  ObjCLanguageRuntime *runtime = ObjCLanguageRuntime::Get(*process_sp);
898 
899  if (!runtime)
900  return false;
901 
903  runtime->GetClassDescriptor(valobj));
904 
905  if (!descriptor || !descriptor->IsValid())
906  return false;
907 
908  uint32_t ptr_size = process_sp->GetAddressByteSize();
909 
910  lldb::addr_t valobj_addr = valobj.GetValueAsUnsigned(0);
911 
912  if (!valobj_addr)
913  return false;
914 
915  uint64_t date_value_bits = 0;
916  double date_value = 0.0;
917 
918  ConstString class_name = descriptor->GetClassName();
919 
920  static const ConstString g_NSDate("NSDate");
921  static const ConstString g___NSDate("__NSDate");
922  static const ConstString g___NSTaggedDate("__NSTaggedDate");
923  static const ConstString g_NSCalendarDate("NSCalendarDate");
924  static const ConstString g_NSConstantDate("NSConstantDate");
925 
926  if (class_name.IsEmpty())
927  return false;
928 
929  uint64_t info_bits = 0, value_bits = 0;
930  if ((class_name == g_NSDate) || (class_name == g___NSDate) ||
931  (class_name == g___NSTaggedDate) || (class_name == g_NSConstantDate)) {
932  if (descriptor->GetTaggedPointerInfo(&info_bits, &value_bits)) {
933  date_value_bits = ((value_bits << 8) | (info_bits << 4));
934  memcpy(&date_value, &date_value_bits, sizeof(date_value_bits));
935  } else {
936  llvm::Triple triple(
937  process_sp->GetTarget().GetArchitecture().GetTriple());
938  uint32_t delta =
939  (triple.isWatchOS() && triple.isWatchABI()) ? 8 : ptr_size;
940  Status error;
941  date_value_bits = process_sp->ReadUnsignedIntegerFromMemory(
942  valobj_addr + delta, 8, 0, error);
943  memcpy(&date_value, &date_value_bits, sizeof(date_value_bits));
944  if (error.Fail())
945  return false;
946  }
947  } else if (class_name == g_NSCalendarDate) {
948  Status error;
949  date_value_bits = process_sp->ReadUnsignedIntegerFromMemory(
950  valobj_addr + 2 * ptr_size, 8, 0, error);
951  memcpy(&date_value, &date_value_bits, sizeof(date_value_bits));
952  if (error.Fail())
953  return false;
954  } else
955  return false;
956 
957  // FIXME: It seems old dates are not formatted according to NSDate's calendar
958  // so we hardcode distantPast's value so that it looks like LLDB is doing
959  // the right thing.
960 
961  // The relative time in seconds from Cocoa Epoch to [NSDate distantPast].
962  const double RelSecondsFromCocoaEpochToNSDateDistantPast = -63114076800;
963  if (date_value == RelSecondsFromCocoaEpochToNSDateDistantPast) {
964  stream.Printf("0001-01-01 00:00:00 UTC");
965  return true;
966  }
967 
968  // Accomodate for the __NSTaggedDate format introduced in Foundation 1600.
969  if (class_name == g___NSTaggedDate) {
970  auto *runtime = llvm::dyn_cast_or_null<AppleObjCRuntime>(
971  ObjCLanguageRuntime::Get(*process_sp));
972  if (runtime && runtime->GetFoundationVersion() >= 1600)
973  date_value = decodeTaggedTimeInterval(value_bits << 4);
974  }
975 
976  // this snippet of code assumes that time_t == seconds since Jan-1-1970 this
977  // is generally true and POSIXly happy, but might break if a library vendor
978  // decides to get creative
979  time_t epoch = GetOSXEpoch();
980  epoch = epoch + static_cast<time_t>(std::floor(date_value));
981  tm *tm_date = gmtime(&epoch);
982  if (!tm_date)
983  return false;
984  std::string buffer(1024, 0);
985  if (strftime(&buffer[0], 1023, "%Z", tm_date) == 0)
986  return false;
987  stream.Printf("%04d-%02d-%02d %02d:%02d:%02d %s", tm_date->tm_year + 1900,
988  tm_date->tm_mon + 1, tm_date->tm_mday, tm_date->tm_hour,
989  tm_date->tm_min, tm_date->tm_sec, buffer.c_str());
990  return true;
991 }
992 
994  ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
995  ProcessSP process_sp = valobj.GetProcessSP();
996  if (!process_sp)
997  return false;
998 
999  ObjCLanguageRuntime *runtime = ObjCLanguageRuntime::Get(*process_sp);
1000 
1001  if (!runtime)
1002  return false;
1003 
1005  runtime->GetClassDescriptorFromISA(valobj.GetValueAsUnsigned(0)));
1006 
1007  if (!descriptor || !descriptor->IsValid())
1008  return false;
1009 
1010  ConstString class_name = descriptor->GetClassName();
1011 
1012  if (class_name.IsEmpty())
1013  return false;
1014 
1015  if (ConstString cs = Mangled(class_name).GetDemangledName())
1016  class_name = cs;
1017 
1018  stream.Printf("%s", class_name.AsCString("<unknown class>"));
1019  return true;
1020 }
1021 
1023 public:
1024  ObjCClassSyntheticChildrenFrontEnd(lldb::ValueObjectSP valobj_sp)
1025  : SyntheticChildrenFrontEnd(*valobj_sp) {}
1026 
1027  ~ObjCClassSyntheticChildrenFrontEnd() override = default;
1028 
1029  size_t CalculateNumChildren() override { return 0; }
1030 
1031  lldb::ValueObjectSP GetChildAtIndex(size_t idx) override {
1032  return lldb::ValueObjectSP();
1033  }
1034 
1035  bool Update() override { return false; }
1036 
1037  bool MightHaveChildren() override { return false; }
1038 
1039  size_t GetIndexOfChildWithName(ConstString name) override {
1040  return UINT32_MAX;
1041  }
1042 };
1043 
1046  CXXSyntheticChildren *, lldb::ValueObjectSP valobj_sp) {
1047  return new ObjCClassSyntheticChildrenFrontEnd(valobj_sp);
1048 }
1049 
1050 template <bool needs_at>
1052  ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
1053  ProcessSP process_sp = valobj.GetProcessSP();
1054  if (!process_sp)
1055  return false;
1056 
1057  ObjCLanguageRuntime *runtime = ObjCLanguageRuntime::Get(*process_sp);
1058 
1059  if (!runtime)
1060  return false;
1061 
1063  runtime->GetClassDescriptor(valobj));
1064 
1065  if (!descriptor || !descriptor->IsValid())
1066  return false;
1067 
1068  bool is_64bit = (process_sp->GetAddressByteSize() == 8);
1069  lldb::addr_t valobj_addr = valobj.GetValueAsUnsigned(0);
1070 
1071  if (!valobj_addr)
1072  return false;
1073 
1074  uint64_t value = 0;
1075 
1076  llvm::StringRef class_name = descriptor->GetClassName().GetCString();
1077 
1078  if (class_name.empty())
1079  return false;
1080 
1081  bool isNSConcreteData = class_name == "NSConcreteData";
1082  bool isNSConcreteMutableData = class_name == "NSConcreteMutableData";
1083  bool isNSCFData = class_name == "__NSCFData";
1084  if (isNSConcreteData || isNSConcreteMutableData || isNSCFData) {
1085  uint32_t offset;
1086  if (isNSConcreteData)
1087  offset = is_64bit ? 8 : 4;
1088  else
1089  offset = is_64bit ? 16 : 8;
1090 
1091  Status error;
1092  value = process_sp->ReadUnsignedIntegerFromMemory(
1093  valobj_addr + offset, is_64bit ? 8 : 4, 0, error);
1094  if (error.Fail())
1095  return false;
1096  } else if (class_name == "_NSInlineData") {
1097  uint32_t offset = (is_64bit ? 8 : 4);
1098  Status error;
1099  value = process_sp->ReadUnsignedIntegerFromMemory(valobj_addr + offset, 2,
1100  0, error);
1101  if (error.Fail())
1102  return false;
1103  } else if (class_name == "_NSZeroData") {
1104  value = 0;
1105  } else
1106  return false;
1107 
1108  stream.Printf("%s%" PRIu64 " byte%s%s", (needs_at ? "@\"" : ""), value,
1109  (value != 1 ? "s" : ""), (needs_at ? "\"" : ""));
1110 
1111  return true;
1112 }
1113 
1115  ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
1116  const uint32_t type_info = valobj.GetCompilerType().GetTypeInfo();
1117 
1118  ValueObjectSP real_guy_sp = valobj.GetSP();
1119 
1120  if (type_info & eTypeIsPointer) {
1121  Status err;
1122  real_guy_sp = valobj.Dereference(err);
1123  if (err.Fail() || !real_guy_sp)
1124  return false;
1125  } else if (type_info & eTypeIsReference) {
1126  real_guy_sp = valobj.GetChildAtIndex(0, true);
1127  if (!real_guy_sp)
1128  return false;
1129  }
1130  int8_t value = (real_guy_sp->GetValueAsSigned(0) & 0xFF);
1131  switch (value) {
1132  case 0:
1133  stream.Printf("NO");
1134  break;
1135  case 1:
1136  stream.Printf("YES");
1137  break;
1138  default:
1139  stream.Printf("%d", value);
1140  break;
1141  }
1142  return true;
1143 }
1144 
1146  ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
1147  lldb::addr_t valobj_ptr_value =
1149  if (valobj_ptr_value == LLDB_INVALID_ADDRESS)
1150  return false;
1151 
1152  ProcessSP process_sp(valobj.GetProcessSP());
1153  if (!process_sp)
1154  return false;
1155 
1156  if (AppleObjCRuntime *objc_runtime = llvm::dyn_cast_or_null<AppleObjCRuntime>(
1157  ObjCLanguageRuntime::Get(*process_sp))) {
1159  cf_false = LLDB_INVALID_ADDRESS;
1160  objc_runtime->GetValuesForGlobalCFBooleans(cf_true, cf_false);
1161  if (valobj_ptr_value == cf_true) {
1162  stream.PutCString("YES");
1163  return true;
1164  }
1165  if (valobj_ptr_value == cf_false) {
1166  stream.PutCString("NO");
1167  return true;
1168  }
1169  }
1170 
1171  return false;
1172 }
1173 
1174 template <bool is_sel_ptr>
1176  ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
1177  lldb::ValueObjectSP valobj_sp;
1178 
1179  CompilerType charstar(valobj.GetCompilerType()
1181  .GetPointerType());
1182 
1183  if (!charstar)
1184  return false;
1185 
1186  ExecutionContext exe_ctx(valobj.GetExecutionContextRef());
1187 
1188  if (is_sel_ptr) {
1189  lldb::addr_t data_address = valobj.GetValueAsUnsigned(LLDB_INVALID_ADDRESS);
1190  if (data_address == LLDB_INVALID_ADDRESS)
1191  return false;
1192  valobj_sp = ValueObject::CreateValueObjectFromAddress("text", data_address,
1193  exe_ctx, charstar);
1194  } else {
1195  DataExtractor data;
1196  Status error;
1197  valobj.GetData(data, error);
1198  if (error.Fail())
1199  return false;
1200  valobj_sp =
1201  ValueObject::CreateValueObjectFromData("text", data, exe_ctx, charstar);
1202  }
1203 
1204  if (!valobj_sp)
1205  return false;
1206 
1207  stream.Printf("%s", valobj_sp->GetSummaryAsCString());
1208  return true;
1209 }
1210 
1211 // POSIX has an epoch on Jan-1-1970, but Cocoa prefers Jan-1-2001
1212 // this call gives the POSIX equivalent of the Cocoa epoch
1214  static time_t epoch = 0;
1215  if (!epoch) {
1216 #ifndef _WIN32
1217  tzset();
1218  tm tm_epoch;
1219  tm_epoch.tm_sec = 0;
1220  tm_epoch.tm_hour = 0;
1221  tm_epoch.tm_min = 0;
1222  tm_epoch.tm_mon = 0;
1223  tm_epoch.tm_mday = 1;
1224  tm_epoch.tm_year = 2001 - 1900;
1225  tm_epoch.tm_isdst = -1;
1226  tm_epoch.tm_gmtoff = 0;
1227  tm_epoch.tm_zone = nullptr;
1228  epoch = timegm(&tm_epoch);
1229 #endif
1230  }
1231  return epoch;
1232 }
1233 
1235  ValueObject &, Stream &, const TypeSummaryOptions &);
1236 
1238  ValueObject &, Stream &, const TypeSummaryOptions &);
1239 
1241  ValueObject &, Stream &, const TypeSummaryOptions &);
1242 
1244  ValueObject &, Stream &, const TypeSummaryOptions &);
lldb_private::toString
const char * toString(AppleArm64ExceptionClass EC)
Definition: AppleArm64ExceptionClass.h:38
TaggedDoubleBits
Definition: Cocoa.cpp:858
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:850
lldb_private::ValueObject::GetValueAsUnsigned
virtual uint64_t GetValueAsUnsigned(uint64_t fail_value, bool *success=nullptr)
Definition: ValueObject.cpp:1090
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:993
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:891
RegisterContextLinux_x86_64
Definition: RegisterContextLinux_x86_64.h:14
PlatformAppleSimulator
Definition: PlatformAppleSimulator.h:21
lldb_private::ObjCLanguageRuntime
Definition: ObjCLanguageRuntime.h:34
add_lldb_library
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
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
ABIX86_i386
Definition: ABIX86_i386.h:14
lldb_private::formatters::ObjCSELSummaryProvider< false >
template bool ObjCSELSummaryProvider< false >(ValueObject &, Stream &, const TypeSummaryOptions &)
lldb::SBError
class LLDB_API SBError
Definition: SBDefines.h:40
ObjCConstants.h
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(REPL) 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_private::formatters::ObjCBOOLSummaryProvider
bool ObjCBOOLSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: Cocoa.cpp:1114
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:862
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
_C_USHT
#define _C_USHT
Definition: ObjCConstants.h:19
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:1022
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:1045
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
_C_UINT
#define _C_UINT
Definition: ObjCConstants.h:21
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
MinidumpFileBuilder
Definition: MinidumpFileBuilder.h:40
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:81
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:865
lldb::SBVariablesOptions
class LLDB_API SBVariablesOptions
Definition: SBDefines.h:93
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:2633
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:716
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:15
DisassemblerLLVMC
Definition: DisassemblerLLVMC.h:23
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:222
DynamicLoaderDarwinKernel
Definition: DynamicLoaderDarwinKernel.h:24
lldb::SBFrame
class LLDB_API SBFrame
Definition: SBDefines.h:48
_C_LNG_LNG
#define _C_LNG_LNG
Definition: ObjCConstants.h:24
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
_C_LNG
#define _C_LNG
Definition: ObjCConstants.h:22
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:860
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:859
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:1679
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:853
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:40
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:854
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
ObjectFileMinidump
Definition: ObjectFileMinidump.h:26
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:765
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:1037
ValueObjectConstResult.h
RegisterContextWindows_x86_64
Definition: RegisterContextWindows_x86_64.h:14
lldb::SBData
class LLDB_API SBData
Definition: SBDefines.h:36
_C_UCHR
#define _C_UCHR
Definition: ObjCConstants.h:17
RegisterContextMemory
Definition: RegisterContextMemory.h:19
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:852
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:1035
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:1175
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:1213
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:1029
ObjCClassSyntheticChildrenFrontEnd::GetIndexOfChildWithName
size_t GetIndexOfChildWithName(ConstString name) override
Definition: Cocoa.cpp:1039
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:855
lldb_private::formatters::ObjCBooleanSummaryProvider
bool ObjCBooleanSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: Cocoa.cpp:1145
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
_C_SHT
#define _C_SHT
Definition: ObjCConstants.h:18
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:871
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:1031
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
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:1024
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
_C_ULNG_LNG
#define _C_ULNG_LNG
Definition: ObjCConstants.h:25
Cocoa.h
lldb::SBModule
class LLDB_API SBModule
Definition: SBDefines.h:59
lldb_private::CXXSyntheticChildren
Definition: TypeSynthetic.h:358
_C_CHR
#define _C_CHR
Definition: ObjCConstants.h:16
RegisterContextPOSIX_x86
Definition: RegisterContextPOSIX_x86.h:18
lldb::SBBreakpointLocation
class LLDB_API SBBreakpointLocation
Definition: SBDefines.h:24
_C_INT
#define _C_INT
Definition: ObjCConstants.h:20
lldb::SBAddress
class LLDB_API SBAddress
Definition: SBDefines.h:21
FormattersHelpers.h
ABISysV_arm64
Definition: ABISysV_arm64.h:15
TaggedDoubleBits::sign
uint64_t sign
Definition: Cocoa.cpp:861
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:42
_C_ULNG
#define _C_ULNG
Definition: ObjCConstants.h:23
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:1051
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