<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Try this:<div class=""><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: 'Perfect DOS VGA 437'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);" class="">Sending source/API/SBValue.cpp</div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: 'Perfect DOS VGA 437'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);" class="">Transmitting file data .</div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: 'Perfect DOS VGA 437'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);" class="">Committed revision 240578.</div><div class=""><br class=""></div><div class="">It seems to fix your issue for me</div><div class=""><br class=""></div><div style=""><blockquote type="cite" class=""><div class="">On Jun 22, 2015, at 12:50 PM, Siva Chandra <<a href="mailto:sivachandra@google.com" class="">sivachandra@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">The following is a small repro case I am using.<br class=""><br class="">C++ source (<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__class.cc&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=MEqT8U_n7oNfuDW5NRbY3ZV384ZquXIYFPWmprwUdKM&m=MT2r9Tg1D0ZGpUg2HnOkEfo1O995gQEUra92sgqaqjI&s=SjDWHjtpVywHTeTZDuY-QDr9ZCLKX6-9-HUvyh0nBKo&e=" class="">class.cc</a>):<br class=""><br class=""> 1 class CCC<br class=""> 2 {<br class=""> 3 public:<br class=""> 4 int a, b, c;<br class=""> 5 };<br class=""> 6 <br class=""> 7 int<br class=""> 8 main ()<br class=""> 9 {<br class=""> 10 CCC obj = { 111, 222, 333 };<br class=""> 11 return 0;<br class=""> 12 }<br class=""><br class="">Python (ccc.py):<br class=""><br class=""> 1 import lldb<br class=""> 2 <br class=""> 3 def ccc_summary(sbvalue, internal_dict):<br class=""> 4 sbvalue = sbvalue.GetNonSyntheticValue()<br class=""> 5 return ("%s, %s, %s" %<br class=""> 6 (str(sbvalue.GetChildMemberWithName("a")),<br class=""> 7 str(sbvalue.GetChildMemberWithName("b")),<br class=""> 8 str(sbvalue.GetChildMemberWithName("c"))))<br class=""> 9 <br class=""> 10 <br class=""> 11 class CCCSynthProvider(object):<br class=""> 12 def __init__(self, sbvalue, internal_dict):<br class=""> 13 self._sbvalue = sbvalue<br class=""> 14 <br class=""> 15 def num_children(self):<br class=""> 16 return 3<br class=""> 17 <br class=""> 18 def get_child_index(self, name):<br class=""> 19 raise RuntimeError("I don't want to be called!")<br class=""> 20 <br class=""> 21 def get_child_at_index(self, index):<br class=""> 22 if index == 0:<br class=""> 23 return self._sbvalue.GetChildMemberWithName("a")<br class=""> 24 if index == 1:<br class=""> 25 return self._sbvalue.GetChildMemberWithName("b")<br class=""> 26 if index == 2:<br class=""> 27 return self._sbvalue.GetChildMemberWithName("c")<br class=""> 28 <br class=""> 29 <br class=""> 30 cat = lldb.debugger.CreateCategory("my_cat")<br class=""> 31 cat.AddTypeSynthetic(<br class=""> 32 lldb.SBTypeNameSpecifier("CCC"),<br class=""> 33 lldb.SBTypeSynthetic.CreateWithClassName("ccc.CCCSynthProvider",<br class=""> 34 lldb.eTypeOptionCascade))<br class=""> 35 cat.AddTypeSummary(<br class=""> 36 lldb.SBTypeNameSpecifier("CCC"),<br class=""> 37 lldb.SBTypeSummary.CreateWithFunctionName("ccc.ccc_summary",<br class=""> 38 lldb.eTypeOptionCascade))<br class=""> 39 cat.SetEnabled(True)<br class=""><br class="">Without the proposed change, this is what happens:<br class=""><br class=""> (lldb) script import ccc<br class=""> (lldb) b <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__class.cc&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=MEqT8U_n7oNfuDW5NRbY3ZV384ZquXIYFPWmprwUdKM&m=MT2r9Tg1D0ZGpUg2HnOkEfo1O995gQEUra92sgqaqjI&s=SjDWHjtpVywHTeTZDuY-QDr9ZCLKX6-9-HUvyh0nBKo&e=" class="">class.cc</a> :11<br class=""> Breakpoint 1: where = a.out`main + 25 at <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__class.cc&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=MEqT8U_n7oNfuDW5NRbY3ZV384ZquXIYFPWmprwUdKM&m=MT2r9Tg1D0ZGpUg2HnOkEfo1O995gQEUra92sgqaqjI&s=SjDWHjtpVywHTeTZDuY-QDr9ZCLKX6-9-HUvyh0nBKo&e=" class="">class.cc</a>:11, address = 0x0000000000400506<br class=""> (lldb) r<br class=""> Process 31046 launched: '/usr/local/google/home/sivachandra/LAB/lldb_scripting/a.out' (x86_64)<br class=""> Process 31046 stopped<br class=""> * thread #1: tid = 31046, 0x0000000000400506 a.out`main + 25 at <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__class.cc&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=MEqT8U_n7oNfuDW5NRbY3ZV384ZquXIYFPWmprwUdKM&m=MT2r9Tg1D0ZGpUg2HnOkEfo1O995gQEUra92sgqaqjI&s=SjDWHjtpVywHTeTZDuY-QDr9ZCLKX6-9-HUvyh0nBKo&e=" class="">class.cc</a>:11, name = 'a.out', stop reason = breakpoint 1.1<br class=""> frame #0: 0x0000000000400506 a.out`main + 25 at <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__class.cc&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=MEqT8U_n7oNfuDW5NRbY3ZV384ZquXIYFPWmprwUdKM&m=MT2r9Tg1D0ZGpUg2HnOkEfo1O995gQEUra92sgqaqjI&s=SjDWHjtpVywHTeTZDuY-QDr9ZCLKX6-9-HUvyh0nBKo&e=" class="">class.cc</a>:11<br class=""> 8 <span class="Apple-tab-span" style="white-space:pre"> </span>main ()<br class=""> 9 <span class="Apple-tab-span" style="white-space:pre"> </span>{<br class=""> 10 <span class="Apple-tab-span" style="white-space:pre"> </span> CCC obj = { 111, 222, 333 };<br class=""> -> 11 <span class="Apple-tab-span" style="white-space:pre"> </span> return 0;<br class=""> 12 <span class="Apple-tab-span" style="white-space:pre"> </span>}<br class=""> (lldb) p obj<br class=""> Traceback (most recent call last):<br class=""> File "./ccc.py", line 19, in get_child_index<br class=""> raise RuntimeError("I don't want to be called!")<br class=""> RuntimeError: I don't want to be called!<br class=""> Traceback (most recent call last):<br class=""> File "./ccc.py", line 19, in get_child_index<br class=""> raise RuntimeError("I don't want to be called!")<br class=""> RuntimeError: I don't want to be called!<br class=""> Traceback (most recent call last):<br class=""> File "./ccc.py", line 19, in get_child_index<br class=""> raise RuntimeError("I don't want to be called!")<br class=""> RuntimeError: I don't want to be called!<br class=""> Traceback (most recent call last):<br class=""> File "./ccc.py", line 19, in get_child_index<br class=""> raise RuntimeError("I don't want to be called!")<br class=""> RuntimeError: I don't want to be called!<br class=""> Traceback (most recent call last):<br class=""> File "./ccc.py", line 19, in get_child_index<br class=""> raise RuntimeError("I don't want to be called!")<br class=""> RuntimeError: I don't want to be called!<br class=""> Traceback (most recent call last):<br class=""> File "./ccc.py", line 19, in get_child_index<br class=""> raise RuntimeError("I don't want to be called!")<br class=""> RuntimeError: I don't want to be called!<br class=""> (CCC) $0 = No value, No value, No value {<br class=""> a = 111<br class=""> b = 222<br class=""> c = 333<br class=""> }<br class=""><br class="">After the proposed change:<br class=""><br class=""> (lldb) script import ccc<br class=""> (lldb) b <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__class.cc&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=MEqT8U_n7oNfuDW5NRbY3ZV384ZquXIYFPWmprwUdKM&m=MT2r9Tg1D0ZGpUg2HnOkEfo1O995gQEUra92sgqaqjI&s=SjDWHjtpVywHTeTZDuY-QDr9ZCLKX6-9-HUvyh0nBKo&e=" class="">class.cc</a> :11<br class=""> Breakpoint 1: where = a.out`main + 25 at <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__class.cc&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=MEqT8U_n7oNfuDW5NRbY3ZV384ZquXIYFPWmprwUdKM&m=MT2r9Tg1D0ZGpUg2HnOkEfo1O995gQEUra92sgqaqjI&s=SjDWHjtpVywHTeTZDuY-QDr9ZCLKX6-9-HUvyh0nBKo&e=" class="">class.cc</a>:11, address = 0x0000000000400506<br class=""> (lldb) r<br class=""> Process 31412 launched: '/usr/local/google/home/sivachandra/LAB/lldb_scripting/a.out' (x86_64)<br class=""> Process 31412 stopped<br class=""> * thread #1: tid = 31412, 0x0000000000400506 a.out`main + 25 at <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__class.cc&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=MEqT8U_n7oNfuDW5NRbY3ZV384ZquXIYFPWmprwUdKM&m=MT2r9Tg1D0ZGpUg2HnOkEfo1O995gQEUra92sgqaqjI&s=SjDWHjtpVywHTeTZDuY-QDr9ZCLKX6-9-HUvyh0nBKo&e=" class="">class.cc</a>:11, name = 'a.out', stop reason = breakpoint 1.1<br class=""> frame #0: 0x0000000000400506 a.out`main + 25 at <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__class.cc&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=MEqT8U_n7oNfuDW5NRbY3ZV384ZquXIYFPWmprwUdKM&m=MT2r9Tg1D0ZGpUg2HnOkEfo1O995gQEUra92sgqaqjI&s=SjDWHjtpVywHTeTZDuY-QDr9ZCLKX6-9-HUvyh0nBKo&e=" class="">class.cc</a>:11<br class=""> 8 <span class="Apple-tab-span" style="white-space:pre"> </span>main ()<br class=""> 9 <span class="Apple-tab-span" style="white-space:pre"> </span>{<br class=""> 10 <span class="Apple-tab-span" style="white-space:pre"> </span> CCC obj = { 111, 222, 333 };<br class=""> -> 11 <span class="Apple-tab-span" style="white-space:pre"> </span> return 0;<br class=""> 12 <span class="Apple-tab-span" style="white-space:pre"> </span>}<br class=""> (lldb) p obj<br class=""> (CCC) $0 = (int) a = 111, (int) b = 222, (int) c = 333 {<br class=""> a = 111<br class=""> b = 222<br class=""> c = 333<br class=""> }<br class=""><br class=""><br class=""><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D10581&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=MEqT8U_n7oNfuDW5NRbY3ZV384ZquXIYFPWmprwUdKM&m=MT2r9Tg1D0ZGpUg2HnOkEfo1O995gQEUra92sgqaqjI&s=kv6Z18utsCoiuqAjeZ_8_rDn-qZSxEdsqv6wutt8dbQ&e=" class="">http://reviews.llvm.org/D10581</a><br class=""><br class="">EMAIL PREFERENCES<br class=""> http://reviews.llvm.org/settings/panel/emailpreferences/<br class=""><br class=""><br class=""><br class="">_______________________________________________<br class="">lldb-commits mailing list<br class="">lldb-commits@cs.uiuc.edu<br class="">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits<br class=""></div></div></blockquote></div><br class=""><div class="">
<div class="" style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class="Apple-interchange-newline">Thanks,</div><div class="" style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><i class="">- Enrico</i><br class="">📩 egranata@<font color="#ff2600" class=""></font>.com ☎️ 27683</div>
</div>
<br class=""></div></body></html>