<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 18, 2021, 1:10 PM Stephen Clark <<a href="mailto:stephen.clark@oarcorp.com">stephen.clark@oarcorp.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="m_-7217331862582569774WordSection1">
<p class="MsoNormal">I think Sebastian and Gedare might have referenced this earlier, but I’m not sure if how to be that descriptive within the 50 character limit. "Use uintptr_t not uint32_t for portability to 64-bit CPUs" is 58 characters without a prefix.
Even when pared down to something like “Use uintptr_t to build on 64-bit CPUs”, there still isn’t room to prepend “rtems-debugger:”.</p></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">I don't think these HAVE to be less than 80 columns just close. But you could drop "not uint32_t" and "for portability" if needed</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"><div lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word"><div class="m_-7217331862582569774WordSection1"><p class="MsoNormal">
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank" rel="noreferrer">joel@rtems.org</a>> <br>
<b>Sent:</b> Thursday, March 18, 2021 12:50 PM<br>
<b>To:</b> Stephen Clark <<a href="mailto:stephen.clark@oarcorp.com" target="_blank" rel="noreferrer">stephen.clark@oarcorp.com</a>><br>
<b>Cc:</b> <a href="mailto:rtems-devel@rtems.org" target="_blank" rel="noreferrer">rtems-devel@rtems.org</a> <<a href="mailto:devel@rtems.org" target="_blank" rel="noreferrer">devel@rtems.org</a>><br>
<b>Subject:</b> Re: [PATCH v2 1/3] rtems-debugger: Fixed 32bit pointers<u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">After picking on Ryan, Alex, and Sebastian, you get it next. :)<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">"Fix" or "Fixed" in the short commit message title is not useful<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">when you browse the log of commits:<br>
<br>
<a href="https://git.rtems.org/rtems/log/" target="_blank" rel="noreferrer">https://git.rtems.org/rtems/log/</a><br>
<br>
Something like "Use uint32_t not uintptr_t for portability to 64-bit CPUs"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">says a lot more. Think of yourself reading that list of commits and what<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">messages tell you enough and which leave you thinking that you need<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">to look at the change to know what was done.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Thu, Mar 18, 2021 at 12:33 PM Stephen Clark <<a href="mailto:stephen.clark@oarcorp.com" target="_blank" rel="noreferrer">stephen.clark@oarcorp.com</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<p class="MsoNormal">Using 32bit types like uint32_t for pointers creates issues on 64 bit<br>
architectures like AArch64. Replaced occurrences of these with uintptr_t,<br>
which will work for both 32 and 64 bit architectures.<br>
---<br>
cpukit/libdebugger/rtems-debugger-server.c | 4 ++--<br>
cpukit/libdebugger/rtems-debugger-target.c | 2 +-<br>
cpukit/libdebugger/rtems-debugger-target.h | 2 +-<br>
3 files changed, 4 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/cpukit/libdebugger/rtems-debugger-server.c b/cpukit/libdebugger/rtems-debugger-server.c<br>
index 975ec23a30..f8c485a794 100644<br>
--- a/cpukit/libdebugger/rtems-debugger-server.c<br>
+++ b/cpukit/libdebugger/rtems-debugger-server.c<br>
@@ -1438,7 +1438,7 @@ remote_read_memory(uint8_t* buffer, int size)<br>
if (comma == NULL)<br>
remote_packet_out_str(r_E01);<br>
else {<br>
- DB_UINT addr;<br>
+ uintptr_t addr;<br>
DB_UINT length;<br>
int r;<br>
addr = hex_decode_uint(&buffer[1]);<br>
@@ -1468,7 +1468,7 @@ remote_write_memory(uint8_t* buffer, int size)<br>
comma = strchr((const char*) buffer, ',');<br>
colon = strchr((const char*) buffer, ':');<br>
if (comma != NULL && colon != NULL) {<br>
- DB_UINT addr;<br>
+ uintptr_t addr;<br>
DB_UINT length;<br>
int r;<br>
addr = hex_decode_uint(&buffer[1]);<u></u><u></u></p>
</blockquote>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I think the changes OK but Chris should comment what <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">happens on 64-bit address targets.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I think this may be decoding the gdb protocol message and we need<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">to know if the field coming in is OK to decode as a uint. <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Your patch is OK but there may be an issue interfacing with the protocol<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">that this points out.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<p class="MsoNormal">diff --git a/cpukit/libdebugger/rtems-debugger-target.c b/cpukit/libdebugger/rtems-debugger-target.c<br>
index bf7579700d..34e4e84d2f 100644<br>
--- a/cpukit/libdebugger/rtems-debugger-target.c<br>
+++ b/cpukit/libdebugger/rtems-debugger-target.c<br>
@@ -168,7 +168,7 @@ rtems_debugger_target_reg_table_size(void)<br>
}<br>
<br>
int<br>
-rtems_debugger_target_swbreak_control(bool insert, DB_UINT addr, DB_UINT kind)<br>
+rtems_debugger_target_swbreak_control(bool insert, uintptr_t addr, DB_UINT kind)<br>
{<br>
rtems_debugger_target* target = rtems_debugger->target;<br>
rtems_debugger_target_swbreak* swbreaks;<br>
diff --git a/cpukit/libdebugger/rtems-debugger-target.h b/cpukit/libdebugger/rtems-debugger-target.h<br>
index f2abbe5fd3..db356e1f07 100644<br>
--- a/cpukit/libdebugger/rtems-debugger-target.h<br>
+++ b/cpukit/libdebugger/rtems-debugger-target.h<br>
@@ -200,7 +200,7 @@ extern void rtems_debugger_target_exception_print(CPU_Exception_frame* frame);<br>
* Software breakpoints. These are also referred to as memory breakpoints.<br>
*/<br>
extern int rtems_debugger_target_swbreak_control(bool insert,<br>
- DB_UINT addr,<br>
+ uintptr_t addr,<br>
DB_UINT kind);<br>
<br>
/**<br>
-- <br>
2.27.0<br>
<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank" rel="noreferrer">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" target="_blank" rel="noreferrer">http://lists.rtems.org/mailman/listinfo/devel</a><u></u><u></u></p>
</blockquote>
</div>
</div>
</div>
</div>
</blockquote></div></div></div>