<div dir="ltr"><div class="gmail_extra">Hi Enrico,<br><br><div class="gmail_quote">On Mon, Jan 21, 2013 at 11:20 AM, Enrico Granata <span dir="ltr"><<a href="mailto:egranata@apple.com" target="_blank">egranata@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">...<br>
@@ -674,6 +676,46 @@<br>
if (bytes_read < total_byte_size)<br>
result.AppendWarningWithFormat("Not all bytes (%lu/%lu) were able to be read from 0x%" PRIx64 ".", bytes_read, total_byte_size, addr);<br>
}<br>
+ else<br>
+ {<br>
+ // we treat c-strings as a special case because they do not have a fixed size<br>
+ if (m_format_options.GetByteSizeValue().OptionWasSet() && !m_format_options.HasGDBFormat())<br>
+ item_byte_size = m_format_options.GetByteSizeValue().GetCurrentValue();<br>
+ else<br>
+ item_byte_size = target->GetMaximumSizeOfStringSummary();<br>
+ if (!m_format_options.GetCountValue().OptionWasSet())<br>
+ item_count = 1;<br></blockquote><div style>^^ didn't you mean count = 1?</div><div style> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ data_sp.reset (new DataBufferHeap ((item_byte_size+1) * item_count, '\0')); // account for NULLs as necessary<br>
+ uint8_t *data_ptr = data_sp->GetBytes();<br>
+ auto data_addr = addr;<br>
+ auto count = item_count;<br>
+ item_count = 0;<br></blockquote><div style>^^ Otherwise, it gets erased by this.</div><div style><br></div><div style>Thanks,</div><div style><br></div><div style> Filipe</div></div></div></div>