<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 22, 2021, 3:54 PM Chris Johns <<a href="mailto:chrisj@rtems.org">chrisj@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 23/3/21 4:58 am, Joel Sherrill wrote:<br>
> On Mon, Mar 22, 2021 at 12:54 PM Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank" rel="noreferrer">joel@rtems.org</a><br>
> <mailto:<a href="mailto:joel@rtems.org" target="_blank" rel="noreferrer">joel@rtems.org</a>>> wrote:<br>
> <br>
>     I posted to the gdb mailing list and this is the response:<br>
> <br>
>     "If the inferior is using 64-bit addresses, then the remote protocol will<br>
>     also use 64-bit addresses. If we have a 32-bit inferior running on<br>
>     aarch64 hardware, we'll have 32-bit addresses over the remote protocol<br>
>     as well.<br>
> <br>
>     Even when we're using 64-bit addresses, the remote protocol may not pad<br>
>     it with zeroes to make it 64-bit, but it should still be handled as 64-bit."<br>
> <br>
>     Unfortunately, I think this means that everywhere the debugger code <br>
>     uses a decode (is there an encode?) uint to decode an address that<br>
>     code needs to change to decode an address (e.g. uintptr) where one is <br>
>     expected in the protocol. And all target addresses in the debugger need <br>
>     to change to uintptr_t.<br>
> <br>
> Luis from gdb just followed up and suggested we always treat it as<br>
> 64-bit and cast to 32-bits. I think uintptr_t is the right answer but I <br>
> wanted to pass that along.<br>
<br>
Thanks and yes this makes sense. Great idea to ask over at gdb.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">I've chatted with Steven privately to explain this. He's going to add a decode address function and then pull the thread from there. I think that will probably be enough to get this right combined with testing on the BBB.</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Chris<br>
</blockquote></div></div></div>