<div dir="ltr">Please commit the attached patch.  Thanks!<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Greg Clayton</b> <span dir="ltr"><<a href="mailto:gclayton@apple.com">gclayton@apple.com</a>></span><br>
Date: Tue, Jan 7, 2014 at 4:37 PM<br>Subject: Re: [PATCH] Python register definition script not being executed<br>To: Steve Pucci <<a href="mailto:spucci@google.com">spucci@google.com</a>><br>Cc: Todd Fiala <<a href="mailto:tfiala@google.com">tfiala@google.com</a>><br>
<br><br>Looks good.<br>
<div><div class="h5"><br>
On Jan 7, 2014, at 3:58 PM, Steve Pucci <<a href="mailto:spucci@google.com">spucci@google.com</a>> wrote:<br>
<br>
> Hi Greg,<br>
><br>
> (Thanks for your previous mail.  Still working through it to get good answers).<br>
><br>
> The attached patch fixes a problem where our register definition script was not being invoked.  I believe that as a result of this change<br>
><br>
> <a href="http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20131202/010096.html" target="_blank">http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20131202/010096.html</a><br>
><br>
> , the call asking for the first register definition "succeeds" even though the response from qRegisterInfo0 is $00#, and this success disturbs the logic in the rest of the method, which was assuming failure from the packet call (specifically, reg_num was now 1 rather than 0 when exiting the for loop, which caused the reading of the Python script to be skipped).<br>

><br>
> One thing I'm not sure of:  there is another dependency on "reg_num == 0" later on in the same method, which is used in the call to m_register_info.HardcodeARMRegisters(from_scratch).  It seems clear that the intent is that reg_num be 0 here as well, though, which this patch will also accomplish.<br>

><br>
> Thanks,<br>
>   Steve<br>
><br>
> diff --git a/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp<br>
> index 0cf3284..a9cf080 100644<br>
> --- a/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp<br>
> +++ b/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp<br>
> @@ -509,6 +509,10 @@ ProcessGDBRemote::BuildDynamicRegisterInfo (bool force)<br>
><br>
>                  m_register_info.AddRegister(reg_info, reg_name, alt_name, set_name);<br>
>              }<br>
> +            else<br>
> +            {<br>
> +                break;  // ensure exit before reg_num is incremented<br>
> +            }<br>
>          }<br>
>          else<br>
>          {<br>
><br>
</div></div>> <patch.txt><br>
<br>
</div><br></div>