)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"593f5ca149fb23c29e5aed87acfedbca7dfdcf05","unresolved":false,"context_lines":[{"line_number":26,"context_line":"coding-style of the eCos support to the newer openocd"},{"line_number":27,"context_line":"coding-style. The aim being that when/if this feature changeset is"},{"line_number":28,"context_line":"approved/merged the source can then be updated to reflect the current"},{"line_number":29,"context_line":"openocd coding-style for completeness."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Change-Id: Ib3a36877326eeb56595cbca55e21b9e59a59c98a"},{"line_number":32,"context_line":"Signed-off-by: James G. Smith \u003cjsmith@rallysmith.co.uk\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"aedf27f1_d85a1c22","line":29,"updated":"2021-05-26 16:50:19.000000000","message":"I\u0027m already addressing some of them, but I will hold on waiting for this patch","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":1001881,"name":"James Smith","email":"jsmith@rallysmith.co.uk","username":"RallySmith"},"change_message_id":"b30a476c013138128ec111c910407c0c340801ae","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"e97e70cd_6a508647","updated":"2022-09-28 12:09:05.000000000","message":"Hopefully the changeset can and will be merged. I have tweaked it slightly for the edits made to the HEAD over the last 15 months.\n\nPurely FYI: The feature has been shipped as a local OpenOCD build to many eCosPro customers over the last 18-months; and it would be good to avoid having to continue to maintain/build/ship a fork.","commit_id":"30509f417ebed151b5236e0b78147de5a3ac830a"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"7f94121aa678977531b8aa5892f2cbb5dfebb49a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"e9627c19_956d893d","updated":"2022-10-08 14:32:40.000000000","message":"Sorry, this patch went down to the end of my inbox, plus the preparation for v0.12.0 let me focus of fixes only.\nWith the +1 from Alex, I\u0027m ok to merge it but I have some extra minor comments, plus I will have to wait for v0.12.0 before merging it.\nIt would be nice to have Alex adding his +1 also to the final version of this patch","commit_id":"30509f417ebed151b5236e0b78147de5a3ac830a"},{"author":{"_account_id":1002048,"name":"Alex Schuilenburg","email":"alex.schuilenburg@gmail.com"},"change_message_id":"2f2caa6567c3937228995e5870afc095494fffee","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"73b523f9_e74edf38","updated":"2022-09-28 13:16:09.000000000","message":"Thanks very much for this contrib. The eCos thread support works well. We have tested it in our test farm where it has successfully ran and provided correct eCos thread information from tens of thousands tests across multiple targets and eCos configurations. These tests were designed to test the extraction of thread information and state from targets running eCos - previously it was only possible to run these tests on RedBoot-based platforms or commercial JTAG hardware scripted with fixed configurations.\n\nWe included this patch/support within the openocd 0.11 build we provide our users since June 2021, and no issues. Only +ve feedback.\n\nTested using gdb and Eclipse based debug.","commit_id":"30509f417ebed151b5236e0b78147de5a3ac830a"},{"author":{"_account_id":1001881,"name":"James Smith","email":"jsmith@rallysmith.co.uk","username":"RallySmith"},"change_message_id":"4656daf92266b78cbe1a64cf2da55cf74d0a9428","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"b62aa771_96448ff1","updated":"2022-10-08 16:32:12.000000000","message":"Applied the suggested patches (now #12).\n\nI will also drop an email to Alex to ask him to build and check and provide a +1 if he is happy.","commit_id":"9971d82a1efa2140eac5d2ecca0f4614fa9b3586"},{"author":{"_account_id":1002048,"name":"Alex Schuilenburg","email":"alex.schuilenburg@gmail.com"},"change_message_id":"62a2c0e7e682fc3dd72de87cfd784f34119573a1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"4c057776_acb66270","updated":"2022-10-11 10:41:56.000000000","message":"Happy with the changes - thanks again for the contrib.","commit_id":"9971d82a1efa2140eac5d2ecca0f4614fa9b3586"},{"author":{"_account_id":1001881,"name":"James Smith","email":"jsmith@rallysmith.co.uk","username":"RallySmith"},"change_message_id":"b883cd92d0ad933ccd32f3c7c685550bf776dc9b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"b7a0e28a_9c8c471a","updated":"2022-10-08 16:43:34.000000000","message":"Should have marked these as done as part of my last comment.","commit_id":"9971d82a1efa2140eac5d2ecca0f4614fa9b3586"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"98da1c0bfd0140c86b18e40d9c3be44e5238c7f7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"3bbbfaf6_bf742b95","updated":"2022-10-08 21:16:43.000000000","message":"Thanks James,\nAlex, there is no big change wrt patchset 11, but would be nice to have your +1 too.","commit_id":"9971d82a1efa2140eac5d2ecca0f4614fa9b3586"}],"src/rtos/eCos.c":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"593f5ca149fb23c29e5aed87acfedbca7dfdcf05","unresolved":false,"context_lines":[{"line_number":30,"context_line":"#include \"rtos_ecos_stackings.h\""},{"line_number":31,"context_line":"#include \"server/gdb_server.h\""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"/* INVESTIGATE: Unfortunately for the moment we are limited to returning the"},{"line_number":34,"context_line":" * hardwired register count (ARMV7M_NUM_CORE_REGS for Cortex-M) since if (for"},{"line_number":35,"context_line":" * Cortex-M) we append BASEPRI or the VFP information to the returned register"},{"line_number":36,"context_line":" * list we get a \"Remote \u0027g\u0027 packet reply is too long (expected 68 bytes, got"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_b85dd81c","line":33,"updated":"2021-05-26 16:50:19.000000000","message":"Please use the keyword FIXME or TODO in place or together to INVESTIGATE.\nWe use FIXME and TODO to look for incomplete code. This new keyword risks to be ignored.","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"593f5ca149fb23c29e5aed87acfedbca7dfdcf05","unresolved":false,"context_lines":[{"line_number":50,"context_line":" * for the stack context descriptor vector to be returned by those calls"},{"line_number":51,"context_line":" * allowing for eventual support where this code will potentially cache"},{"line_number":52,"context_line":" * different sets of register descriptors for the different shapes of contexts"},{"line_number":53,"context_line":" * in a *single* application/binary run-time. In preperation for that work the"},{"line_number":54,"context_line":" * _EXTENDED_REGLIST manifest controls some extra code as work-in-progress for"},{"line_number":55,"context_line":" * that support. */"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_789f70ba","line":53,"range":{"start_line":53,"start_character":49,"end_line":53,"end_character":60},"updated":"2021-05-26 16:50:19.000000000","message":"typo s/preperation/preparation/","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"593f5ca149fb23c29e5aed87acfedbca7dfdcf05","unresolved":false,"context_lines":[{"line_number":54,"context_line":" * _EXTENDED_REGLIST manifest controls some extra code as work-in-progress for"},{"line_number":55,"context_line":" * that support. */"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"/* #define _EXTENDED_REGLIST (1) */"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"struct eCos_params;"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_78d4504c","line":57,"updated":"2021-05-26 16:50:19.000000000","message":"There is already an abuse of #if/#else/#endif in OpenOCD, and I want to limit it.\nWhat is this \"extended reglist\"?\nSome code not yet ready, so temporarily hidden?\nOr an optional eCos feature that requires a special built OpenOCD, aligned with the feature?","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1001881,"name":"James Smith","email":"jsmith@rallysmith.co.uk","username":"RallySmith"},"change_message_id":"ae92bf9f66fc3d35527902b38ec4e0b3ea56d883","unresolved":false,"context_lines":[{"line_number":54,"context_line":" * _EXTENDED_REGLIST manifest controls some extra code as work-in-progress for"},{"line_number":55,"context_line":" * that support. */"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"/* #define _EXTENDED_REGLIST (1) */"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"struct eCos_params;"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_f8f4c0cd","line":57,"in_reply_to":"aedf27f1_78d4504c","updated":"2021-05-26 20:16:30.000000000","message":"It is present as a hint. I started to code support for returning the FPU registers before realising that the openocd RTOS support is hardwired to the \"core\" registers only and does not have a mechanism for obtaining per-thread-context FPU registers (or none that I found).\n\nI am happy to remove that code from the changeset since it is a bigger issue than supporting eCos properly. It is unnecessary noise at the moment.","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"2f88bf7a3d29dad52b820a8a32b419265f286a69","unresolved":false,"context_lines":[{"line_number":54,"context_line":" * _EXTENDED_REGLIST manifest controls some extra code as work-in-progress for"},{"line_number":55,"context_line":" * that support. */"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"/* #define _EXTENDED_REGLIST (1) */"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"struct eCos_params;"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_f8ea80d6","line":57,"in_reply_to":"aedf27f1_f8f4c0cd","updated":"2021-05-26 22:31:18.000000000","message":"Ok, please remove it. Eventually add a comment with text \"TODO:\", saying that the support for FPU is not present yet.","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"593f5ca149fb23c29e5aed87acfedbca7dfdcf05","unresolved":false,"context_lines":[{"line_number":78,"context_line":"};"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"/* The status is actually a logical-OR bitmask of states: */"},{"line_number":81,"context_line":"typedef enum __attribute__ ((__packed__)) {"},{"line_number":82,"context_line":"\tRUNNING    \u003d 0,"},{"line_number":83,"context_line":"\tSLEEPING   \u003d 1,"},{"line_number":84,"context_line":"\tCOUNTSLEEP \u003d 2,"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_b8eab803","line":81,"updated":"2021-05-26 16:50:19.000000000","message":"packed enum ? What you want to achieve here?","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1001881,"name":"James Smith","email":"jsmith@rallysmith.co.uk","username":"RallySmith"},"change_message_id":"81d940b7e98532b952b6618e374e541e198a0ebf","unresolved":false,"context_lines":[{"line_number":78,"context_line":"};"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"/* The status is actually a logical-OR bitmask of states: */"},{"line_number":81,"context_line":"typedef enum __attribute__ ((__packed__)) {"},{"line_number":82,"context_line":"\tRUNNING    \u003d 0,"},{"line_number":83,"context_line":"\tSLEEPING   \u003d 1,"},{"line_number":84,"context_line":"\tCOUNTSLEEP \u003d 2,"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_78be90d3","line":81,"in_reply_to":"aedf27f1_18e8a4dc","updated":"2021-05-26 22:52:34.000000000","message":"Just FYI: For GCC packed is applicable to enum (shortens the type based on the range). However, to avoid contention I will remove it.","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"2f88bf7a3d29dad52b820a8a32b419265f286a69","unresolved":false,"context_lines":[{"line_number":78,"context_line":"};"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"/* The status is actually a logical-OR bitmask of states: */"},{"line_number":81,"context_line":"typedef enum __attribute__ ((__packed__)) {"},{"line_number":82,"context_line":"\tRUNNING    \u003d 0,"},{"line_number":83,"context_line":"\tSLEEPING   \u003d 1,"},{"line_number":84,"context_line":"\tCOUNTSLEEP \u003d 2,"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_18e8a4dc","line":81,"in_reply_to":"aedf27f1_18f2e4df","updated":"2021-05-26 22:31:18.000000000","message":"Understand, but the packet attributes applies to struct, not to enum. It should be ignored here.","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"c02639383742bce4b5f798beec61d8180e6727e7","unresolved":false,"context_lines":[{"line_number":78,"context_line":"};"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"/* The status is actually a logical-OR bitmask of states: */"},{"line_number":81,"context_line":"typedef enum __attribute__ ((__packed__)) {"},{"line_number":82,"context_line":"\tRUNNING    \u003d 0,"},{"line_number":83,"context_line":"\tSLEEPING   \u003d 1,"},{"line_number":84,"context_line":"\tCOUNTSLEEP \u003d 2,"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_589aac67","line":81,"in_reply_to":"aedf27f1_78be90d3","updated":"2021-05-27 08:25:39.000000000","message":"You are right! It causes the enum to be represented by a \"short\" instead of by an \"int\".\nActually it makes sense if it is stored in a struct, but here is only passed through registers.\nI would prefer avoiding this extra dependency from gcc.","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1001881,"name":"James Smith","email":"jsmith@rallysmith.co.uk","username":"RallySmith"},"change_message_id":"ae92bf9f66fc3d35527902b38ec4e0b3ea56d883","unresolved":false,"context_lines":[{"line_number":78,"context_line":"};"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"/* The status is actually a logical-OR bitmask of states: */"},{"line_number":81,"context_line":"typedef enum __attribute__ ((__packed__)) {"},{"line_number":82,"context_line":"\tRUNNING    \u003d 0,"},{"line_number":83,"context_line":"\tSLEEPING   \u003d 1,"},{"line_number":84,"context_line":"\tCOUNTSLEEP \u003d 2,"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_18f2e4df","line":81,"in_reply_to":"aedf27f1_b8eab803","updated":"2021-05-26 20:16:30.000000000","message":"Coming from a deeply embedded world, where space is always at a premium, it was a bit of auto-typing to keep types small.","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"593f5ca149fb23c29e5aed87acfedbca7dfdcf05","unresolved":false,"context_lines":[{"line_number":80,"context_line":"/* The status is actually a logical-OR bitmask of states: */"},{"line_number":81,"context_line":"typedef enum __attribute__ ((__packed__)) {"},{"line_number":82,"context_line":"\tRUNNING    \u003d 0,"},{"line_number":83,"context_line":"\tSLEEPING   \u003d 1,"},{"line_number":84,"context_line":"\tCOUNTSLEEP \u003d 2,"},{"line_number":85,"context_line":"\tSUSPENDED  \u003d 4,"},{"line_number":86,"context_line":"\tCREATING   \u003d 8,"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_d8e77c3a","line":83,"updated":"2021-05-26 16:50:19.000000000","message":"use the BIT() macro to initialize them","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"593f5ca149fb23c29e5aed87acfedbca7dfdcf05","unresolved":false,"context_lines":[{"line_number":256,"context_line":" * armv7m_map_id_to_regsel() function in that source maps to the ARM"},{"line_number":257,"context_line":" * register. It might just be a limitation of the RTOS support API."},{"line_number":258,"context_line":" */"},{"line_number":259,"context_line":"# define ECOS_CORTEXM_BASE_NUMREGS (ECOS_REGLIST_BASEPRI + 1);"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"/* IMPLEMENT: When we enable the support for per-thread non-FPU/FPU register"},{"line_number":262,"context_line":" * state being returned (since we will want to cache both forms) we could"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_98a49406","line":259,"updated":"2021-05-26 16:50:19.000000000","message":"remove the \";\" after the macro definition.\nIf you need it, it should be in the code that uses the macro","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1001881,"name":"James Smith","email":"jsmith@rallysmith.co.uk","username":"RallySmith"},"change_message_id":"ae92bf9f66fc3d35527902b38ec4e0b3ea56d883","unresolved":false,"context_lines":[{"line_number":256,"context_line":" * armv7m_map_id_to_regsel() function in that source maps to the ARM"},{"line_number":257,"context_line":" * register. It might just be a limitation of the RTOS support API."},{"line_number":258,"context_line":" */"},{"line_number":259,"context_line":"# define ECOS_CORTEXM_BASE_NUMREGS (ECOS_REGLIST_BASEPRI + 1);"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"/* IMPLEMENT: When we enable the support for per-thread non-FPU/FPU register"},{"line_number":262,"context_line":" * state being returned (since we will want to cache both forms) we could"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_b8fe38aa","line":259,"in_reply_to":"aedf27f1_98a49406","updated":"2021-05-26 20:16:30.000000000","message":"A typo. It will be removed.","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"593f5ca149fb23c29e5aed87acfedbca7dfdcf05","unresolved":false,"context_lines":[{"line_number":518,"context_line":"\t}"},{"line_number":519,"context_line":""},{"line_number":520,"context_line":"\treturn val;"},{"line_number":521,"context_line":"}"},{"line_number":522,"context_line":""},{"line_number":523,"context_line":"/** Escape any XML reserved characters in a string. */"},{"line_number":524,"context_line":"static bool eCos_escape_string(const char *raw, char *out, size_t limit)"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_38cec8ba","line":521,"updated":"2021-05-26 16:50:19.000000000","message":"simplify:\nif (idx \u003c ..)\n    return rtos-\u003esym...;\n/* We do not ... */\nLOG_ERROR();\nreturn 0;","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"593f5ca149fb23c29e5aed87acfedbca7dfdcf05","unresolved":false,"context_lines":[{"line_number":524,"context_line":"static bool eCos_escape_string(const char *raw, char *out, size_t limit)"},{"line_number":525,"context_line":"{"},{"line_number":526,"context_line":"\tstatic const char *tokens \u003d \"\u003c\u0026\u003e\\\u0027\\\"\";"},{"line_number":527,"context_line":"\t#define XMLENTRY(_c, _s) { .xc \u003d (_c), .rs \u003d (_s), .rlen \u003d (sizeof(_s)-1) }"},{"line_number":528,"context_line":"\tstatic const struct {"},{"line_number":529,"context_line":"\t\tchar xc;"},{"line_number":530,"context_line":"\t\tconst char *rs;"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_38a9e8dc","line":527,"updated":"2021-05-26 16:50:19.000000000","message":"It should be better moving the macro definition out of the function. Maybe also the definition of xmlchars[] could be moved out of the function.\nadd space around the operator \"-\"","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1001881,"name":"James Smith","email":"jsmith@rallysmith.co.uk","username":"RallySmith"},"change_message_id":"ae92bf9f66fc3d35527902b38ec4e0b3ea56d883","unresolved":false,"context_lines":[{"line_number":524,"context_line":"static bool eCos_escape_string(const char *raw, char *out, size_t limit)"},{"line_number":525,"context_line":"{"},{"line_number":526,"context_line":"\tstatic const char *tokens \u003d \"\u003c\u0026\u003e\\\u0027\\\"\";"},{"line_number":527,"context_line":"\t#define XMLENTRY(_c, _s) { .xc \u003d (_c), .rs \u003d (_s), .rlen \u003d (sizeof(_s)-1) }"},{"line_number":528,"context_line":"\tstatic const struct {"},{"line_number":529,"context_line":"\t\tchar xc;"},{"line_number":530,"context_line":"\t\tconst char *rs;"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_d8fbfcb8","line":527,"in_reply_to":"aedf27f1_38a9e8dc","updated":"2021-05-26 20:16:30.000000000","message":"Just trying to limit scope. However, if it makes the changeset easier to accept I will refactor.","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"593f5ca149fb23c29e5aed87acfedbca7dfdcf05","unresolved":false,"context_lines":[{"line_number":534,"context_line":"\t\tXMLENTRY(\u0027\u0026\u0027, \"\u0026amp;\"),"},{"line_number":535,"context_line":"\t\tXMLENTRY(\u0027\u003e\u0027, \"\u0026gt;\"),"},{"line_number":536,"context_line":"\t\tXMLENTRY(\u0027\\\u0027\u0027, \"\u0026apos;\"),"},{"line_number":537,"context_line":"\t\tXMLENTRY(\u0027\\\"\u0027, \"\u0026quot;\")"},{"line_number":538,"context_line":"\t};"},{"line_number":539,"context_line":"\tbool escaped \u003d false;"},{"line_number":540,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_f8c7e098","line":537,"updated":"2021-05-26 16:50:19.000000000","message":"no need to escape the double-quote","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"593f5ca149fb23c29e5aed87acfedbca7dfdcf05","unresolved":false,"context_lines":[{"line_number":538,"context_line":"\t};"},{"line_number":539,"context_line":"\tbool escaped \u003d false;"},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"\tif (out \u0026\u0026 limit) {"},{"line_number":542,"context_line":"\t\t(void)memset(out, \u0027\\0\u0027, limit);"},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"\t\twhile (raw \u0026\u0026 *raw \u0026\u0026 limit) {"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_f8b28047","line":541,"updated":"2021-05-26 16:50:19.000000000","message":"This function has too deep indentation, making it hard to read.\nReturn immediately if nothing to do:\nif (!out || !limit)\n   return false;\nand then remove one level of indentation","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"593f5ca149fb23c29e5aed87acfedbca7dfdcf05","unresolved":false,"context_lines":[{"line_number":550,"context_line":"\t\t\t\tlimit -\u003d tocopy;"},{"line_number":551,"context_line":"\t\t\t\tout +\u003d tocopy;"},{"line_number":552,"context_line":"\t\t\t\traw +\u003d lok;"},{"line_number":553,"context_line":"\t\t\t} else {"},{"line_number":554,"context_line":"\t\t\t\tchar *fidx \u003d strchr(tokens, *raw);"},{"line_number":555,"context_line":"\t\t\t\tif (fidx) {"},{"line_number":556,"context_line":"\t\t\t\t\tuint32_t cidx \u003d (fidx - tokens);"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_18b0a43d","line":553,"updated":"2021-05-26 16:50:19.000000000","message":"here \nif (loc) {\n  ...;\n  continue;\n}\nthen you don\u0027t need the \"else\" and remove the indentation of following code","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"593f5ca149fb23c29e5aed87acfedbca7dfdcf05","unresolved":false,"context_lines":[{"line_number":552,"context_line":"\t\t\t\traw +\u003d lok;"},{"line_number":553,"context_line":"\t\t\t} else {"},{"line_number":554,"context_line":"\t\t\t\tchar *fidx \u003d strchr(tokens, *raw);"},{"line_number":555,"context_line":"\t\t\t\tif (fidx) {"},{"line_number":556,"context_line":"\t\t\t\t\tuint32_t cidx \u003d (fidx - tokens);"},{"line_number":557,"context_line":"\t\t\t\t\tsize_t tocopy \u003d xmlchars[cidx].rlen;"},{"line_number":558,"context_line":"\t\t\t\t\tif (limit \u003c tocopy) {"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_d8b9bc2a","line":555,"updated":"2021-05-26 16:50:19.000000000","message":"also here\nif (!fidx) {\n  /* ... */\n  LOG_ERROR(...);\n  continue;\n}\nand remove another indentation level","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"593f5ca149fb23c29e5aed87acfedbca7dfdcf05","unresolved":false,"context_lines":[{"line_number":557,"context_line":"\t\t\t\t\tsize_t tocopy \u003d xmlchars[cidx].rlen;"},{"line_number":558,"context_line":"\t\t\t\t\tif (limit \u003c tocopy) {"},{"line_number":559,"context_line":"\t\t\t\t\t\tbreak;"},{"line_number":560,"context_line":"\t\t\t\t\t} else {"},{"line_number":561,"context_line":"\t\t\t\t\t\tescaped \u003d true;"},{"line_number":562,"context_line":"\t\t\t\t\t\t(void)memcpy(out,"},{"line_number":563,"context_line":"\t\t\t\t\t\t\txmlchars[cidx].rs,"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_58ae2ce6","line":560,"updated":"2021-05-26 16:50:19.000000000","message":"No need for the \"else\" after the \"break\"; just go ahead coding at the same indentation level of \"if\"","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"593f5ca149fb23c29e5aed87acfedbca7dfdcf05","unresolved":false,"context_lines":[{"line_number":559,"context_line":"\t\t\t\t\t\tbreak;"},{"line_number":560,"context_line":"\t\t\t\t\t} else {"},{"line_number":561,"context_line":"\t\t\t\t\t\tescaped \u003d true;"},{"line_number":562,"context_line":"\t\t\t\t\t\t(void)memcpy(out,"},{"line_number":563,"context_line":"\t\t\t\t\t\t\txmlchars[cidx].rs,"},{"line_number":564,"context_line":"\t\t\t\t\t\t\ttocopy);"},{"line_number":565,"context_line":"\t\t\t\t\t\tlimit -\u003d tocopy;"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_7886906c","line":562,"updated":"2021-05-26 16:50:19.000000000","message":"can be kept in a single line","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"593f5ca149fb23c29e5aed87acfedbca7dfdcf05","unresolved":false,"context_lines":[{"line_number":580,"context_line":""},{"line_number":581,"context_line":"static int eCos_check_app_info(struct rtos *rtos, struct eCos_params *param)"},{"line_number":582,"context_line":"{"},{"line_number":583,"context_line":"\tif ((NULL \u003d\u003d rtos) || (NULL \u003d\u003d param))"},{"line_number":584,"context_line":"\t\treturn -1;"},{"line_number":585,"context_line":""},{"line_number":586,"context_line":"\tif (param-\u003eflush_common) {"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_988b3472","line":583,"updated":"2021-05-26 16:50:19.000000000","message":"Coding style requires to replace the comparison to NULL as:\nif (!rtos || !param)\nAnyway the comparison should be written as (variable operator constant). I see other cases below.","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"593f5ca149fb23c29e5aed87acfedbca7dfdcf05","unresolved":false,"context_lines":[{"line_number":581,"context_line":"static int eCos_check_app_info(struct rtos *rtos, struct eCos_params *param)"},{"line_number":582,"context_line":"{"},{"line_number":583,"context_line":"\tif ((NULL \u003d\u003d rtos) || (NULL \u003d\u003d param))"},{"line_number":584,"context_line":"\t\treturn -1;"},{"line_number":585,"context_line":""},{"line_number":586,"context_line":"\tif (param-\u003eflush_common) {"},{"line_number":587,"context_line":"\t\tif (LOG_LVL_DEBUG \u003c\u003d debug_level) {"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_3880084b","line":584,"updated":"2021-05-26 16:50:19.000000000","message":"this function returns ERROR_OK below, but here? ERROR_FAIL?","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"593f5ca149fb23c29e5aed87acfedbca7dfdcf05","unresolved":false,"context_lines":[{"line_number":584,"context_line":"\t\treturn -1;"},{"line_number":585,"context_line":""},{"line_number":586,"context_line":"\tif (param-\u003eflush_common) {"},{"line_number":587,"context_line":"\t\tif (LOG_LVL_DEBUG \u003c\u003d debug_level) {"},{"line_number":588,"context_line":"\t\t\tunsigned int idx;"},{"line_number":589,"context_line":"\t\t\tfor (idx \u003d 0; (idx \u003c ARRAY_SIZE(eCos_symbol_list)); idx++) {"},{"line_number":590,"context_line":"\t\t\t\tLOG_DEBUG(\"eCos: %s 0x%016\" PRIX64 \" %s\","}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_18974495","line":587,"updated":"2021-05-26 16:50:19.000000000","message":"swap:\nif (debug_level \u003d\u003e LOG_LVL_DEBUG) {","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"593f5ca149fb23c29e5aed87acfedbca7dfdcf05","unresolved":false,"context_lines":[{"line_number":586,"context_line":"\tif (param-\u003eflush_common) {"},{"line_number":587,"context_line":"\t\tif (LOG_LVL_DEBUG \u003c\u003d debug_level) {"},{"line_number":588,"context_line":"\t\t\tunsigned int idx;"},{"line_number":589,"context_line":"\t\t\tfor (idx \u003d 0; (idx \u003c ARRAY_SIZE(eCos_symbol_list)); idx++) {"},{"line_number":590,"context_line":"\t\t\t\tLOG_DEBUG(\"eCos: %s 0x%016\" PRIX64 \" %s\","},{"line_number":591,"context_line":"\t\t\t\t\t(rtos-\u003esymbols[idx].optional ? \"OPTIONAL\" : \"        \"),"},{"line_number":592,"context_line":"\t\t\t\t\trtos-\u003esymbols[idx].address, rtos-\u003esymbols[idx].symbol_name);"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_f89920c9","line":589,"updated":"2021-05-26 16:50:19.000000000","message":"move here the definition\nfor (unsigned int idx \u003d 0; ...)\nand remove the parenthesis around \"idx \u003c ...\"","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"593f5ca149fb23c29e5aed87acfedbca7dfdcf05","unresolved":false,"context_lines":[{"line_number":596,"context_line":"\t\t/* If \"__ecospro_syminfo.size.cyg_thread.list_next\" is non-zero then we"},{"line_number":597,"context_line":"\t\t * expect all of the generic thread structure symbols to have been"},{"line_number":598,"context_line":"\t\t * provided. */"},{"line_number":599,"context_line":"\t\tif (0 !\u003d ecos_value(rtos, eCos_VAL_common_thread_next_size)) {"},{"line_number":600,"context_line":"\t\t\tparam-\u003epointer_width \u003d ecos_value(rtos, eCos_VAL_common_thread_next_size);"},{"line_number":601,"context_line":"\t\t\tparam-\u003euid_width \u003d ecos_value(rtos, eCos_VAL_common_thread_id_size);"},{"line_number":602,"context_line":"\t\t\tparam-\u003estate_width \u003d ecos_value(rtos, eCos_VAL_common_thread_state_size);"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_5885cc59","line":599,"updated":"2021-05-26 16:50:19.000000000","message":"use an intermediate value and swap the operands of the comparison\nsymbol_address_t addr \u003d evos_value();\nif (addr !\u003d 0) {","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1001881,"name":"James Smith","email":"jsmith@rallysmith.co.uk","username":"RallySmith"},"change_message_id":"ae92bf9f66fc3d35527902b38ec4e0b3ea56d883","unresolved":false,"context_lines":[{"line_number":596,"context_line":"\t\t/* If \"__ecospro_syminfo.size.cyg_thread.list_next\" is non-zero then we"},{"line_number":597,"context_line":"\t\t * expect all of the generic thread structure symbols to have been"},{"line_number":598,"context_line":"\t\t * provided. */"},{"line_number":599,"context_line":"\t\tif (0 !\u003d ecos_value(rtos, eCos_VAL_common_thread_next_size)) {"},{"line_number":600,"context_line":"\t\t\tparam-\u003epointer_width \u003d ecos_value(rtos, eCos_VAL_common_thread_next_size);"},{"line_number":601,"context_line":"\t\t\tparam-\u003euid_width \u003d ecos_value(rtos, eCos_VAL_common_thread_id_size);"},{"line_number":602,"context_line":"\t\t\tparam-\u003estate_width \u003d ecos_value(rtos, eCos_VAL_common_thread_state_size);"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_7828d032","line":599,"in_reply_to":"aedf27f1_5885cc59","updated":"2021-05-26 20:16:30.000000000","message":"No problem. However I am just in the habit of coding (constant \u003d\u003d var) since the typo (constant \u003d var) is a compilation fail, whereas (var \u003d constant) is only a warning :-)","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"2f88bf7a3d29dad52b820a8a32b419265f286a69","unresolved":false,"context_lines":[{"line_number":596,"context_line":"\t\t/* If \"__ecospro_syminfo.size.cyg_thread.list_next\" is non-zero then we"},{"line_number":597,"context_line":"\t\t * expect all of the generic thread structure symbols to have been"},{"line_number":598,"context_line":"\t\t * provided. */"},{"line_number":599,"context_line":"\t\tif (0 !\u003d ecos_value(rtos, eCos_VAL_common_thread_next_size)) {"},{"line_number":600,"context_line":"\t\t\tparam-\u003epointer_width \u003d ecos_value(rtos, eCos_VAL_common_thread_next_size);"},{"line_number":601,"context_line":"\t\t\tparam-\u003euid_width \u003d ecos_value(rtos, eCos_VAL_common_thread_id_size);"},{"line_number":602,"context_line":"\t\t\tparam-\u003estate_width \u003d ecos_value(rtos, eCos_VAL_common_thread_state_size);"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_b8f4f8ba","line":599,"in_reply_to":"aedf27f1_7828d032","updated":"2021-05-26 22:31:18.000000000","message":"In openocd there was a kind of anarchy and both were permitted. It has been changed recently in doc/manual/style.txt","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"593f5ca149fb23c29e5aed87acfedbca7dfdcf05","unresolved":false,"context_lines":[{"line_number":851,"context_line":"\t\t/* Since the OpenOCD RTOS support can attempt to obtain thread"},{"line_number":852,"context_line":"\t\t * information on initial connection when the system *may* have"},{"line_number":853,"context_line":"\t\t * undefined memory state it is possible for a simple thread count scan"},{"line_number":854,"context_line":"\t\t * to produce invalid results. To avoid blocking indefinately when"},{"line_number":855,"context_line":"\t\t * encountering an invalid closed loop we limit the number of threads to"},{"line_number":856,"context_line":"\t\t * the maximum possible, and if we pass that limit then something is"},{"line_number":857,"context_line":"\t\t * wrong so treat the system as having no threads defined. */"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_18c50491","line":854,"updated":"2021-05-26 16:50:19.000000000","message":"typo s/indefinately/indefinitely/","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"593f5ca149fb23c29e5aed87acfedbca7dfdcf05","unresolved":false,"context_lines":[{"line_number":866,"context_line":"\t\t\tretval \u003d target_read_buffer(rtos-\u003etarget,"},{"line_number":867,"context_line":"\t\t\t\t\tthread_index + param-\u003ethread_next_offset,"},{"line_number":868,"context_line":"\t\t\t\t\tparam-\u003epointer_width,"},{"line_number":869,"context_line":"\t\t\t\t\t(uint8_t *) \u0026thread_index);"},{"line_number":870,"context_line":"\t\t\tif (retval !\u003d ERROR_OK)"},{"line_number":871,"context_line":"\t\t\t\treturn retval;"},{"line_number":872,"context_line":"\t\t} while (thread_index !\u003d first_thread);"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_b89398a5","line":869,"updated":"2021-05-26 16:50:19.000000000","message":"no space after cast","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"593f5ca149fb23c29e5aed87acfedbca7dfdcf05","unresolved":false,"context_lines":[{"line_number":900,"context_line":"\t\t/* Either : No RTOS threads - there is always at least the current execution though */"},{"line_number":901,"context_line":"\t\t/* OR     : No current thread - all threads suspended - show the current execution"},{"line_number":902,"context_line":"\t\t * of idling */"},{"line_number":903,"context_line":"\t\tconst char tmp_str[] \u003d \"Current Execution\";"},{"line_number":904,"context_line":"\t\tthread_list_size++;"},{"line_number":905,"context_line":"\t\ttasks_found++;"},{"line_number":906,"context_line":"\t\trtos-\u003ethread_details \u003d malloc("}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_d890dc9a","line":903,"updated":"2021-05-26 16:50:19.000000000","message":"static const char ...","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"593f5ca149fb23c29e5aed87acfedbca7dfdcf05","unresolved":false,"context_lines":[{"line_number":937,"context_line":"\t\tretval \u003d target_read_buffer(rtos-\u003etarget,"},{"line_number":938,"context_line":"\t\t\t\tthread_index + param-\u003ethread_uniqueid_offset,"},{"line_number":939,"context_line":"\t\t\t\tparam-\u003euid_width,"},{"line_number":940,"context_line":"\t\t\t\t(uint8_t *)\u0026thread_id);"},{"line_number":941,"context_line":"\t\tif (retval !\u003d ERROR_OK) {"},{"line_number":942,"context_line":"\t\t\tLOG_ERROR(\"Could not read eCos thread id from target\");"},{"line_number":943,"context_line":"\t\t\treturn retval;"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_f8e04027","line":940,"updated":"2021-05-26 16:50:19.000000000","message":"here the thread_id will not have the same value on the target and on the host that runs OpenOCD if the two have different endianess.\nWith this change, if host is little-endian the thread_id will be filled in the low part ((uid_width\u003d\u003d2) \u003d\u003d\u003e (thread_id\u003c\u003d0xffff)). But for host big-endian the thread_id will be filled in the high part. Is this ok?\nAlso, \"threadid_t\" is a typedef to \"int\"! filling the high part can make it negative.\nThe code for rtos is quite messy in this context.\nPlus above you write that eCos thread identifier is 12 bits! Are you talking about the same stuff?","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"593f5ca149fb23c29e5aed87acfedbca7dfdcf05","unresolved":false,"context_lines":[{"line_number":983,"context_line":"\t\t\t * avoid overly long strings. */"},{"line_number":984,"context_line":"\t\t\tchar esc_str[ECOS_THREAD_NAME_STR_SIZE];"},{"line_number":985,"context_line":"\t\t\tbool escaped;"},{"line_number":986,"context_line":"\t\t\tescaped \u003d eCos_escape_string(tmp_str, esc_str, sizeof(esc_str));"},{"line_number":987,"context_line":"\t\t\tif (escaped)"},{"line_number":988,"context_line":"\t\t\t\tstrcpy(tmp_str, esc_str);"},{"line_number":989,"context_line":"\t\t}"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_18de6471","line":986,"updated":"2021-05-26 16:50:19.000000000","message":"in the same line:\nbool escaped \u003d eCos_...;","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"593f5ca149fb23c29e5aed87acfedbca7dfdcf05","unresolved":false,"context_lines":[{"line_number":1082,"context_line":"\t\t\tpri_extra \u003d (12 + 20); /* worst-case \", Priority: \" */"},{"line_number":1083,"context_line":"\t\t}"},{"line_number":1084,"context_line":""},{"line_number":1085,"context_line":"\t\tsize_t eilen \u003d (8 + strlen(state_desc)+tr_extra+pri_extra);"},{"line_number":1086,"context_line":"\t\tchar *eistr \u003d malloc(eilen);"},{"line_number":1087,"context_line":"\t\tif (eistr) {"},{"line_number":1088,"context_line":"\t\t\tint soff \u003d snprintf(eistr, eilen, \"State: %s\", state_desc);"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_78ed3022","line":1085,"updated":"2021-05-26 16:50:19.000000000","message":"add space around \"+\"","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"593f5ca149fb23c29e5aed87acfedbca7dfdcf05","unresolved":false,"context_lines":[{"line_number":1084,"context_line":""},{"line_number":1085,"context_line":"\t\tsize_t eilen \u003d (8 + strlen(state_desc)+tr_extra+pri_extra);"},{"line_number":1086,"context_line":"\t\tchar *eistr \u003d malloc(eilen);"},{"line_number":1087,"context_line":"\t\tif (eistr) {"},{"line_number":1088,"context_line":"\t\t\tint soff \u003d snprintf(eistr, eilen, \"State: %s\", state_desc);"},{"line_number":1089,"context_line":"\t\t\tif (tr_extra \u0026\u0026 reason_desc)"},{"line_number":1090,"context_line":"\t\t\t\tsoff +\u003d snprintf(\u0026eistr[soff], (eilen - soff), \" (%s)\", reason_desc);"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_98f25402","line":1087,"updated":"2021-05-26 16:50:19.000000000","message":"no, if malloc fails you should\nLOG_ERROR(\"Out of memory\");\nand return with error.","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"593f5ca149fb23c29e5aed87acfedbca7dfdcf05","unresolved":false,"context_lines":[{"line_number":1186,"context_line":"\t\t}"},{"line_number":1187,"context_line":""},{"line_number":1188,"context_line":"\t\tif (0 \u003d\u003d stack_ptr) {"},{"line_number":1189,"context_line":"\t\t\tLOG_ERROR(\"NULL stack pointer in thread %\" PRIu64 \"\", thread_id);"},{"line_number":1190,"context_line":"\t\t\treturn -5;"},{"line_number":1191,"context_line":"\t\t}"},{"line_number":1192,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":2,"id":"aedf27f1_38f7a8f4","line":1189,"updated":"2021-05-26 16:50:19.000000000","message":"no need for the empty string \"\" at the end","commit_id":"719f75ce8e3f4da3c15fa117ab17568d6eabc958"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"91c26353f65be0317de52a4734c4ef8cc5e88837","unresolved":false,"context_lines":[{"line_number":31,"context_line":"#include \"rtos_ecos_stackings.h\""},{"line_number":32,"context_line":"#include \"server/gdb_server.h\""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"/* Unfortunately for the moment we are limited to returning the hardwired"},{"line_number":35,"context_line":" * register count (ARMV7M_NUM_CORE_REGS for Cortex-M) since if (for Cortex-M) we"},{"line_number":36,"context_line":" * append BASEPRI or the VFP information to the returned register list we get a"},{"line_number":37,"context_line":" * \"Remote \u0027g\u0027 packet reply is too long (expected 68 bytes, got XXX bytes)\""},{"line_number":38,"context_line":" * error from GDB. We need to ascertain the best solution to returning"},{"line_number":39,"context_line":" * per-thread BASEPRI and VFP information to GDB."},{"line_number":40,"context_line":" *"},{"line_number":41,"context_line":" * So, for the moment, we continue to use the hardwired limit for the depth of"},{"line_number":42,"context_line":" * the returned register description vector. The rtos_standard_stackings.c also"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"aedf27f1_5b85c659","line":39,"range":{"start_line":34,"start_character":0,"end_line":39,"end_character":49},"updated":"2021-05-31 21:21:11.000000000","message":"GDB expects only the \"core\" (or \"general\") registers as reply to \"g\" command.\nThe other registers are requested one by one with command \"p\"\nhttps://sourceware.org/gdb/onlinedocs/gdb/Packets.html\nIt\u0027s architecture specific which are the \"core\" registers","commit_id":"8be47a3bd30ee4eb6f9ca78f515f1469e39b06d9"},{"author":{"_account_id":1001881,"name":"James Smith","email":"jsmith@rallysmith.co.uk","username":"RallySmith"},"change_message_id":"ecdb69f5ae67840c453513227e80ac1fb19035ee","unresolved":false,"context_lines":[{"line_number":31,"context_line":"#include \"rtos_ecos_stackings.h\""},{"line_number":32,"context_line":"#include \"server/gdb_server.h\""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"/* Unfortunately for the moment we are limited to returning the hardwired"},{"line_number":35,"context_line":" * register count (ARMV7M_NUM_CORE_REGS for Cortex-M) since if (for Cortex-M) we"},{"line_number":36,"context_line":" * append BASEPRI or the VFP information to the returned register list we get a"},{"line_number":37,"context_line":" * \"Remote \u0027g\u0027 packet reply is too long (expected 68 bytes, got XXX bytes)\""},{"line_number":38,"context_line":" * error from GDB. We need to ascertain the best solution to returning"},{"line_number":39,"context_line":" * per-thread BASEPRI and VFP information to GDB."},{"line_number":40,"context_line":" *"},{"line_number":41,"context_line":" * So, for the moment, we continue to use the hardwired limit for the depth of"},{"line_number":42,"context_line":" * the returned register description vector. The rtos_standard_stackings.c also"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"aedf27f1_5b42a614","line":39,"range":{"start_line":34,"start_character":0,"end_line":39,"end_character":49},"in_reply_to":"aedf27f1_5b85c659","updated":"2021-05-31 21:53:59.000000000","message":"Maybe the wrong choice of wording on my part. The concept I was trying to cover was that the openocd RTOS support does not seem to provide any mechanism for obtaining the \"non-core\" registers on a per-thread basis. I will reword the comment, or just remove it. None of the other RTOS support \"plugins\" seem to worry about returning per-thread VFP/FPU register state in the Cortex/ARM cases.","commit_id":"8be47a3bd30ee4eb6f9ca78f515f1469e39b06d9"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"91c26353f65be0317de52a4734c4ef8cc5e88837","unresolved":false,"context_lines":[{"line_number":535,"context_line":"\t\tif (debug_level \u003e\u003d LOG_LVL_DEBUG) {"},{"line_number":536,"context_line":"\t\t\tfor (unsigned int idx \u003d 0; idx \u003c ARRAY_SIZE(eCos_symbol_list); idx++) {"},{"line_number":537,"context_line":"\t\t\t\tLOG_DEBUG(\"eCos: %s 0x%016\" PRIX64 \" %s\","},{"line_number":538,"context_line":"\t\t\t\t\t(rtos-\u003esymbols[idx].optional ? \"OPTIONAL\" : \"        \"),"},{"line_number":539,"context_line":"\t\t\t\t\trtos-\u003esymbols[idx].address, rtos-\u003esymbols[idx].symbol_name);"},{"line_number":540,"context_line":"\t\t\t}"},{"line_number":541,"context_line":"\t\t}"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"aedf27f1_1b973e95","line":538,"updated":"2021-05-31 21:21:11.000000000","message":"remove the useless parenthesis around this line","commit_id":"8be47a3bd30ee4eb6f9ca78f515f1469e39b06d9"},{"author":{"_account_id":1001881,"name":"James Smith","email":"jsmith@rallysmith.co.uk","username":"RallySmith"},"change_message_id":"ecdb69f5ae67840c453513227e80ac1fb19035ee","unresolved":false,"context_lines":[{"line_number":535,"context_line":"\t\tif (debug_level \u003e\u003d LOG_LVL_DEBUG) {"},{"line_number":536,"context_line":"\t\t\tfor (unsigned int idx \u003d 0; idx \u003c ARRAY_SIZE(eCos_symbol_list); idx++) {"},{"line_number":537,"context_line":"\t\t\t\tLOG_DEBUG(\"eCos: %s 0x%016\" PRIX64 \" %s\","},{"line_number":538,"context_line":"\t\t\t\t\t(rtos-\u003esymbols[idx].optional ? \"OPTIONAL\" : \"        \"),"},{"line_number":539,"context_line":"\t\t\t\t\trtos-\u003esymbols[idx].address, rtos-\u003esymbols[idx].symbol_name);"},{"line_number":540,"context_line":"\t\t\t}"},{"line_number":541,"context_line":"\t\t}"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"aedf27f1_fb46fa25","line":538,"in_reply_to":"aedf27f1_1b973e95","updated":"2021-05-31 21:53:59.000000000","message":"Will do. It is just more defensive editing/programming on my part. It makes the scope clear and reduces the chance of cut-n-paste errors if you just deal with blocks :-)\nI will update the changeset re. the remaining style comments you have below.","commit_id":"8be47a3bd30ee4eb6f9ca78f515f1469e39b06d9"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"91c26353f65be0317de52a4734c4ef8cc5e88837","unresolved":false,"context_lines":[{"line_number":559,"context_line":"\t\t\t/* Currently all eCos configurations use a 16-bit field to hold the"},{"line_number":560,"context_line":"\t\t\t * unique thread ID. */"},{"line_number":561,"context_line":"\t\t\tLOG_WARNING(\"eCos: Unexpected unique_id width %\" PRIu8, param-\u003euid_width);"},{"line_number":562,"context_line":"\t\t\tparam-\u003euid_width \u003d (unsigned char)sizeof(uint16_t);"},{"line_number":563,"context_line":"\t\t}"},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"\t\tparam-\u003estacking_info \u003d NULL;"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"aedf27f1_bb9392a5","line":562,"updated":"2021-05-31 21:21:11.000000000","message":"I think there is no need for cast","commit_id":"8be47a3bd30ee4eb6f9ca78f515f1469e39b06d9"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"91c26353f65be0317de52a4734c4ef8cc5e88837","unresolved":false,"context_lines":[{"line_number":599,"context_line":"\t * param-\u003estacking_info is a holder whilst we are limited to the fixed"},{"line_number":600,"context_line":"\t * ARMV7M_NUM_CORE_REGS set of descriptors. */"},{"line_number":601,"context_line":""},{"line_number":602,"context_line":"\tif ((NULL \u003d\u003d param-\u003estacking_info) \u0026\u0026"},{"line_number":603,"context_line":"\t\t(0 !\u003d ecos_value(rtos, eCos_VAL_cortexm_thread_saved)) \u0026\u0026"},{"line_number":604,"context_line":"\t\t(0 !\u003d ecos_value(rtos, eCos_VAL_cortexm_val_thread))) {"},{"line_number":605,"context_line":"\t\tunsigned char numoutreg \u003d ECOS_CORTEXM_BASE_NUMREGS;"},{"line_number":606,"context_line":""},{"line_number":607,"context_line":"\t\trtos_eCos_stacking.stack_registers_size \u003d ecos_value(rtos, eCos_VAL_cortexm_ctx_thread_size);"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"aedf27f1_db90d69a","line":604,"range":{"start_line":602,"start_character":0,"end_line":604,"end_character":57},"updated":"2021-05-31 21:21:11.000000000","message":"swap all of them:\n\"variable\" \"operator\" \"constant\"\nPlus comparison \"prt \u003d\u003d NULL\" becomes \"!ptr\"","commit_id":"8be47a3bd30ee4eb6f9ca78f515f1469e39b06d9"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"91c26353f65be0317de52a4734c4ef8cc5e88837","unresolved":false,"context_lines":[{"line_number":633,"context_line":""},{"line_number":634,"context_line":"\t\t/* Common Cortex-M thread register offsets for the current"},{"line_number":635,"context_line":"\t\t * symbol table: */"},{"line_number":636,"context_line":"\t\tif ((ERROR_OK \u003d\u003d retval) \u0026\u0026 param-\u003estacking_info) {"},{"line_number":637,"context_line":"\t\t\tif (ECOS_REGLIST_BASEPRI \u003c numoutreg) {"},{"line_number":638,"context_line":"\t\t\t\trtos_ecos_regoff_cortexm[ECOS_REGLIST_BASEPRI].offset \u003d"},{"line_number":639,"context_line":"\t\t\t\t\tecos_value(rtos, eCos_VAL_cortexm_ctx_basepri_off);"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"aedf27f1_7bed2a22","line":636,"updated":"2021-05-31 21:21:11.000000000","message":"\"variable\" \"operator\" \"constant\"","commit_id":"8be47a3bd30ee4eb6f9ca78f515f1469e39b06d9"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"91c26353f65be0317de52a4734c4ef8cc5e88837","unresolved":false,"context_lines":[{"line_number":654,"context_line":"{"},{"line_number":655,"context_line":"\tint retval \u003d ERROR_OK;"},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"\tif ((NULL \u003d\u003d param-\u003estacking_info) \u0026\u0026"},{"line_number":658,"context_line":"\t\t(0 !\u003d ecos_value(rtos, eCos_VAL_arm_regsize))) {"},{"line_number":659,"context_line":"\t\t/* When OpenOCD is extended to allow FPU registers to be returned from a"},{"line_number":660,"context_line":"\t\t * stacked thread context we can check:"},{"line_number":661,"context_line":"\t\t *\t\tif (0 !\u003d ecos_value(rtos, eCos_VAL_arm_fpusize)) { FPU }"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"aedf27f1_9bf24e02","line":658,"range":{"start_line":657,"start_character":0,"end_line":658,"end_character":50},"updated":"2021-05-31 21:21:11.000000000","message":"\"variable\" \"operator\" \"constant\"","commit_id":"8be47a3bd30ee4eb6f9ca78f515f1469e39b06d9"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"91c26353f65be0317de52a4734c4ef8cc5e88837","unresolved":false,"context_lines":[{"line_number":702,"context_line":"\tint thread_list_size \u003d 0;"},{"line_number":703,"context_line":"\tstruct eCos_params *param;"},{"line_number":704,"context_line":""},{"line_number":705,"context_line":"\tif (rtos \u003d\u003d NULL)"},{"line_number":706,"context_line":"\t\treturn -1;"},{"line_number":707,"context_line":""},{"line_number":708,"context_line":"\t/* wipe out previous thread details if any */"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"aedf27f1_3bf7a2f4","line":705,"updated":"2021-05-31 21:21:11.000000000","message":"if (!rtos)","commit_id":"8be47a3bd30ee4eb6f9ca78f515f1469e39b06d9"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"91c26353f65be0317de52a4734c4ef8cc5e88837","unresolved":false,"context_lines":[{"line_number":708,"context_line":"\t/* wipe out previous thread details if any */"},{"line_number":709,"context_line":"\trtos_free_threadlist(rtos);"},{"line_number":710,"context_line":""},{"line_number":711,"context_line":"\tif (rtos-\u003ertos_specific_params \u003d\u003d NULL)"},{"line_number":712,"context_line":"\t\treturn -3;"},{"line_number":713,"context_line":""},{"line_number":714,"context_line":"\tparam \u003d (struct eCos_params *) rtos-\u003ertos_specific_params;"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"aedf27f1_5bfce6d5","line":711,"updated":"2021-05-31 21:21:11.000000000","message":"same","commit_id":"8be47a3bd30ee4eb6f9ca78f515f1469e39b06d9"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"91c26353f65be0317de52a4734c4ef8cc5e88837","unresolved":false,"context_lines":[{"line_number":711,"context_line":"\tif (rtos-\u003ertos_specific_params \u003d\u003d NULL)"},{"line_number":712,"context_line":"\t\treturn -3;"},{"line_number":713,"context_line":""},{"line_number":714,"context_line":"\tparam \u003d (struct eCos_params *) rtos-\u003ertos_specific_params;"},{"line_number":715,"context_line":""},{"line_number":716,"context_line":"\tif (rtos-\u003esymbols \u003d\u003d NULL) {"},{"line_number":717,"context_line":"\t\t/* NOTE: We only see this when connecting from GDB the first"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"aedf27f1_fbe03a27","line":714,"updated":"2021-05-31 21:21:11.000000000","message":"no need for cast, since rtos_specific_params is a (void *)\nstruct eCos_params *param \u003d rtos-\u003ertos_specific_params;","commit_id":"8be47a3bd30ee4eb6f9ca78f515f1469e39b06d9"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"91c26353f65be0317de52a4734c4ef8cc5e88837","unresolved":false,"context_lines":[{"line_number":713,"context_line":""},{"line_number":714,"context_line":"\tparam \u003d (struct eCos_params *) rtos-\u003ertos_specific_params;"},{"line_number":715,"context_line":""},{"line_number":716,"context_line":"\tif (rtos-\u003esymbols \u003d\u003d NULL) {"},{"line_number":717,"context_line":"\t\t/* NOTE: We only see this when connecting from GDB the first"},{"line_number":718,"context_line":"\t\t * time before the application image is loaded. So it is not a"},{"line_number":719,"context_line":"\t\t * hook for detecting an application change. */"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"aedf27f1_1bde5e71","line":716,"updated":"2021-05-31 21:21:11.000000000","message":"same","commit_id":"8be47a3bd30ee4eb6f9ca78f515f1469e39b06d9"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"91c26353f65be0317de52a4734c4ef8cc5e88837","unresolved":false,"context_lines":[{"line_number":755,"context_line":"\t\t * wrong so treat the system as having no threads defined. */"},{"line_number":756,"context_line":"\t\tdo {"},{"line_number":757,"context_line":"\t\t\tthread_list_size++;"},{"line_number":758,"context_line":"\t\t\tif (ECOS_MAX_THREAD_COUNT \u003c thread_list_size) {"},{"line_number":759,"context_line":"\t\t\t\t/* Treat as \"no threads\" case: */"},{"line_number":760,"context_line":"\t\t\t\tfirst_thread \u003d 0;"},{"line_number":761,"context_line":"\t\t\t\tthread_list_size \u003d 0;"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"aedf27f1_bbeab203","line":758,"updated":"2021-05-31 21:21:11.000000000","message":"same","commit_id":"8be47a3bd30ee4eb6f9ca78f515f1469e39b06d9"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"91c26353f65be0317de52a4734c4ef8cc5e88837","unresolved":false,"context_lines":[{"line_number":877,"context_line":"\t\t * will trigger this failure unless escaped. */"},{"line_number":878,"context_line":"\t\tif (tmp_str[0] \u003d\u003d \u0027\\x00\u0027)"},{"line_number":879,"context_line":"\t\t\tsnprintf(tmp_str, ECOS_THREAD_NAME_STR_SIZE, \"NoName:[0x%08\" PRIX32 \"]\", thread_index);"},{"line_number":880,"context_line":"\t\telse {"},{"line_number":881,"context_line":"\t\t\t/* The following is a workaround to avoid any issues"},{"line_number":882,"context_line":"\t\t\t * from arbitrary eCos thread names causing GDB/OpenOCD"},{"line_number":883,"context_line":"\t\t\t * issues. We limit the escaped thread name passed to"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"aedf27f1_dbe7763a","line":880,"updated":"2021-05-31 21:21:11.000000000","message":"is one branch of if/then/else needs curly brackets {} you have to add to both","commit_id":"8be47a3bd30ee4eb6f9ca78f515f1469e39b06d9"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"91c26353f65be0317de52a4734c4ef8cc5e88837","unresolved":false,"context_lines":[{"line_number":945,"context_line":"\t\tint64_t sleep_reason \u003d 0; /* sleep reason */"},{"line_number":946,"context_line":""},{"line_number":947,"context_line":"\t\tif ((thread_index !\u003d current_thread_addr) \u0026\u0026"},{"line_number":948,"context_line":"\t\t\t(0 !\u003d ecos_value(rtos, eCos_VAL_common_thread_sleep_size))) {"},{"line_number":949,"context_line":"\t\t\tretval \u003d target_read_buffer(rtos-\u003etarget,"},{"line_number":950,"context_line":"\t\t\t\t(thread_index + ecos_value(rtos, eCos_VAL_common_thread_sleep_off)),"},{"line_number":951,"context_line":"\t\t\t\tecos_value(rtos, eCos_VAL_common_thread_sleep_size),"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"aedf27f1_7bd44a4c","line":948,"updated":"2021-05-31 21:21:11.000000000","message":"same","commit_id":"8be47a3bd30ee4eb6f9ca78f515f1469e39b06d9"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"91c26353f65be0317de52a4734c4ef8cc5e88837","unresolved":false,"context_lines":[{"line_number":955,"context_line":"\t\t\t\treturn retval;"},{"line_number":956,"context_line":"\t\t\t}"},{"line_number":957,"context_line":"\t\t\tif ((sleep_reason \u003c 0) ||"},{"line_number":958,"context_line":"\t\t\t\t((int64_t)ARRAY_SIZE(ecos_thread_reasons) \u003c sleep_reason)) {"},{"line_number":959,"context_line":"\t\t\t\tsleep_reason \u003d 0;"},{"line_number":960,"context_line":"\t\t\t}"},{"line_number":961,"context_line":"\t\t}"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"aedf27f1_fb991ac9","line":958,"updated":"2021-05-31 21:21:11.000000000","message":"coding style: \"variable\" \"operator\" \"constant\"\nsleep_reason \u003e (int64_t)ARRAY_SIZE(...)","commit_id":"8be47a3bd30ee4eb6f9ca78f515f1469e39b06d9"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"91c26353f65be0317de52a4734c4ef8cc5e88837","unresolved":false,"context_lines":[{"line_number":971,"context_line":"\t\t/* Display thread priority if available: */"},{"line_number":972,"context_line":"\t\tint64_t priority \u003d 0;"},{"line_number":973,"context_line":"\t\tsize_t pri_extra \u003d 0;"},{"line_number":974,"context_line":"\t\tif (0 !\u003d ecos_value(rtos, eCos_VAL_common_thread_pri_size)) {"},{"line_number":975,"context_line":"\t\t\tretval \u003d target_read_buffer(rtos-\u003etarget,"},{"line_number":976,"context_line":"\t\t\t\t(thread_index + ecos_value(rtos, eCos_VAL_common_thread_pri_off)),"},{"line_number":977,"context_line":"\t\t\t\tecos_value(rtos, eCos_VAL_common_thread_pri_size),"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"aedf27f1_9bd9ee85","line":974,"updated":"2021-05-31 21:21:11.000000000","message":"same","commit_id":"8be47a3bd30ee4eb6f9ca78f515f1469e39b06d9"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"91c26353f65be0317de52a4734c4ef8cc5e88837","unresolved":false,"context_lines":[{"line_number":1028,"context_line":"\tint retval;"},{"line_number":1029,"context_line":"\tstruct eCos_params *param;"},{"line_number":1030,"context_line":""},{"line_number":1031,"context_line":"\tif (rtos \u003d\u003d NULL)"},{"line_number":1032,"context_line":"\t\treturn -1;"},{"line_number":1033,"context_line":""},{"line_number":1034,"context_line":"\tif (thread_id \u003d\u003d 0)"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"aedf27f1_3bcec2ba","line":1031,"updated":"2021-05-31 21:21:11.000000000","message":"(!rtos)","commit_id":"8be47a3bd30ee4eb6f9ca78f515f1469e39b06d9"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"91c26353f65be0317de52a4734c4ef8cc5e88837","unresolved":false,"context_lines":[{"line_number":1034,"context_line":"\tif (thread_id \u003d\u003d 0)"},{"line_number":1035,"context_line":"\t\treturn -2;"},{"line_number":1036,"context_line":""},{"line_number":1037,"context_line":"\tif (rtos-\u003ertos_specific_params \u003d\u003d NULL)"},{"line_number":1038,"context_line":"\t\treturn -3;"},{"line_number":1039,"context_line":""},{"line_number":1040,"context_line":"\tparam \u003d (struct eCos_params *) rtos-\u003ertos_specific_params;"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"aedf27f1_5bd38661","line":1037,"updated":"2021-05-31 21:21:11.000000000","message":"same","commit_id":"8be47a3bd30ee4eb6f9ca78f515f1469e39b06d9"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"91c26353f65be0317de52a4734c4ef8cc5e88837","unresolved":false,"context_lines":[{"line_number":1037,"context_line":"\tif (rtos-\u003ertos_specific_params \u003d\u003d NULL)"},{"line_number":1038,"context_line":"\t\treturn -3;"},{"line_number":1039,"context_line":""},{"line_number":1040,"context_line":"\tparam \u003d (struct eCos_params *) rtos-\u003ertos_specific_params;"},{"line_number":1041,"context_line":""},{"line_number":1042,"context_line":"\tretval \u003d eCos_check_app_info(rtos, param);"},{"line_number":1043,"context_line":"\tif (ERROR_OK !\u003d retval)"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"aedf27f1_fbc7da98","line":1040,"updated":"2021-05-31 21:21:11.000000000","message":"no need for cast","commit_id":"8be47a3bd30ee4eb6f9ca78f515f1469e39b06d9"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"91c26353f65be0317de52a4734c4ef8cc5e88837","unresolved":false,"context_lines":[{"line_number":1093,"context_line":"\t\t\treturn retval;"},{"line_number":1094,"context_line":"\t\t}"},{"line_number":1095,"context_line":""},{"line_number":1096,"context_line":"\t\tif (0 \u003d\u003d stack_ptr) {"},{"line_number":1097,"context_line":"\t\t\tLOG_ERROR(\"NULL stack pointer in thread %\" PRIu64, thread_id);"},{"line_number":1098,"context_line":"\t\t\treturn -5;"},{"line_number":1099,"context_line":"\t\t}"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"aedf27f1_1bc5fe90","line":1096,"updated":"2021-05-31 21:21:11.000000000","message":"same","commit_id":"8be47a3bd30ee4eb6f9ca78f515f1469e39b06d9"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"91c26353f65be0317de52a4734c4ef8cc5e88837","unresolved":false,"context_lines":[{"line_number":1106,"context_line":"\t\t\t\treturn retval;"},{"line_number":1107,"context_line":"\t\t\t}"},{"line_number":1108,"context_line":"\t\t}"},{"line_number":1109,"context_line":"\t\tif (NULL \u003d\u003d stacking_info)"},{"line_number":1110,"context_line":"\t\t\tstacking_info \u003d \u0026rtos_eCos_Cortex_M3_stacking;"},{"line_number":1111,"context_line":""},{"line_number":1112,"context_line":"\t\treturn rtos_generic_stack_read(rtos-\u003etarget,"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"aedf27f1_bbc15285","line":1109,"updated":"2021-05-31 21:21:11.000000000","message":"same","commit_id":"8be47a3bd30ee4eb6f9ca78f515f1469e39b06d9"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"91c26353f65be0317de52a4734c4ef8cc5e88837","unresolved":false,"context_lines":[{"line_number":1166,"context_line":""},{"line_number":1167,"context_line":"\tif (packet[0] \u003d\u003d \u0027H\u0027 \u0026\u0026 packet[1] \u003d\u003d \u0027g\u0027) {"},{"line_number":1168,"context_line":"\t\t(void)sscanf(packet, \"Hg%16\" SCNx64, \u0026current_threadid);"},{"line_number":1169,"context_line":"\t\tif (0 \u003d\u003d current_threadid) {"},{"line_number":1170,"context_line":"\t\t\tstruct target *target \u003d get_target_from_connection(connection);"},{"line_number":1171,"context_line":"\t\t\tif (target \u0026\u0026 target-\u003ertos \u0026\u0026 target-\u003ertos-\u003ertos_specific_params) {"},{"line_number":1172,"context_line":"\t\t\t\tstruct eCos_params *param;"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"aedf27f1_dbbe96fa","line":1169,"updated":"2021-05-31 21:21:11.000000000","message":"same","commit_id":"8be47a3bd30ee4eb6f9ca78f515f1469e39b06d9"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"91c26353f65be0317de52a4734c4ef8cc5e88837","unresolved":false,"context_lines":[{"line_number":1170,"context_line":"\t\t\tstruct target *target \u003d get_target_from_connection(connection);"},{"line_number":1171,"context_line":"\t\t\tif (target \u0026\u0026 target-\u003ertos \u0026\u0026 target-\u003ertos-\u003ertos_specific_params) {"},{"line_number":1172,"context_line":"\t\t\t\tstruct eCos_params *param;"},{"line_number":1173,"context_line":"\t\t\t\tparam \u003d (struct eCos_params *)target-\u003ertos-\u003ertos_specific_params;"},{"line_number":1174,"context_line":"\t\t\t\tparam-\u003eflush_common \u003d true;"},{"line_number":1175,"context_line":"\t\t\t}"},{"line_number":1176,"context_line":"\t\t}"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"aedf27f1_7b33eac0","line":1173,"updated":"2021-05-31 21:21:11.000000000","message":"no cast","commit_id":"8be47a3bd30ee4eb6f9ca78f515f1469e39b06d9"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"91c26353f65be0317de52a4734c4ef8cc5e88837","unresolved":false,"context_lines":[{"line_number":1219,"context_line":"\tLOG_ERROR(\"Could not find target in eCos compatibility list\");"},{"line_number":1220,"context_line":"\treturn -1;"},{"line_number":1221,"context_line":"}"},{"line_number":1222,"context_line":""},{"line_number":1223,"context_line":"/* Local Variables:  */"},{"line_number":1224,"context_line":"/* mode: c           */"},{"line_number":1225,"context_line":"/* tab-width: 4      */"},{"line_number":1226,"context_line":"/* End:              */"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"aedf27f1_9b380e9d","line":1226,"range":{"start_line":1222,"start_character":0,"end_line":1226,"end_character":23},"updated":"2021-05-31 21:21:11.000000000","message":"None of OpenOCD files uses this.\nIf you need it here, then you also need it in every file.\nCan you configure it in your editor as default for this folder so there is no need to add it to each file.\nI use vim and I have set in ~/.vimrc\n:if stridx(expand(\"%:p\"), \"/openocd\") !\u003d -1\n        :set ts\u003d4\n:endif","commit_id":"8be47a3bd30ee4eb6f9ca78f515f1469e39b06d9"},{"author":{"_account_id":1001881,"name":"James Smith","email":"jsmith@rallysmith.co.uk","username":"RallySmith"},"change_message_id":"ecdb69f5ae67840c453513227e80ac1fb19035ee","unresolved":false,"context_lines":[{"line_number":1219,"context_line":"\tLOG_ERROR(\"Could not find target in eCos compatibility list\");"},{"line_number":1220,"context_line":"\treturn -1;"},{"line_number":1221,"context_line":"}"},{"line_number":1222,"context_line":""},{"line_number":1223,"context_line":"/* Local Variables:  */"},{"line_number":1224,"context_line":"/* mode: c           */"},{"line_number":1225,"context_line":"/* tab-width: 4      */"},{"line_number":1226,"context_line":"/* End:              */"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"aedf27f1_bb5072da","line":1226,"range":{"start_line":1222,"start_character":0,"end_line":1226,"end_character":23},"in_reply_to":"aedf27f1_9b380e9d","updated":"2021-05-31 21:53:59.000000000","message":"I will remove it. It was just short-hand (quicker than creating a directory-local variable emacs file); and I did not care about the formatting of other openocd sources since I was not editing them :-)","commit_id":"8be47a3bd30ee4eb6f9ca78f515f1469e39b06d9"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"7f94121aa678977531b8aa5892f2cbb5dfebb49a","unresolved":true,"context_lines":[{"line_number":80,"context_line":"\tCREATING   \u003d BIT(3),"},{"line_number":81,"context_line":"\tEXITED     \u003d BIT(4),"},{"line_number":82,"context_line":"\tSLEEPSET   \u003d (SLEEPING | COUNTSLEEP)"},{"line_number":83,"context_line":"} ecos_thread_state_flags;"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"/* Cyg_Thread:: reason codes for wake and sleep fields: */"},{"line_number":86,"context_line":"static const struct ecos_thread_state ecos_thread_reasons[] \u003d {"}],"source_content_type":"text/x-csrc","patch_set":11,"id":"11e125c4_a2736b99","line":83,"updated":"2022-10-08 14:32:40.000000000","message":"Please no new typedef. This can be written as:\n enum ecos_thread_state_flags {\n   RUNNING ...\n };","commit_id":"30509f417ebed151b5236e0b78147de5a3ac830a"},{"author":{"_account_id":1001881,"name":"James Smith","email":"jsmith@rallysmith.co.uk","username":"RallySmith"},"change_message_id":"b883cd92d0ad933ccd32f3c7c685550bf776dc9b","unresolved":false,"context_lines":[{"line_number":80,"context_line":"\tCREATING   \u003d BIT(3),"},{"line_number":81,"context_line":"\tEXITED     \u003d BIT(4),"},{"line_number":82,"context_line":"\tSLEEPSET   \u003d (SLEEPING | COUNTSLEEP)"},{"line_number":83,"context_line":"} ecos_thread_state_flags;"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"/* Cyg_Thread:: reason codes for wake and sleep fields: */"},{"line_number":86,"context_line":"static const struct ecos_thread_state ecos_thread_reasons[] \u003d {"}],"source_content_type":"text/x-csrc","patch_set":11,"id":"670742c7_56f56731","line":83,"in_reply_to":"11e125c4_a2736b99","updated":"2022-10-08 16:43:34.000000000","message":"Done","commit_id":"30509f417ebed151b5236e0b78147de5a3ac830a"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"7f94121aa678977531b8aa5892f2cbb5dfebb49a","unresolved":true,"context_lines":[{"line_number":97,"context_line":"static const char * const target_cortex_m[] \u003d {"},{"line_number":98,"context_line":"\t\"cortex_m\","},{"line_number":99,"context_line":"\t\"hla_target\","},{"line_number":100,"context_line":"\tNULL };"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"static const char * const target_arm[] \u003d {"},{"line_number":103,"context_line":"\t\"cortex_a\","}],"source_content_type":"text/x-csrc","patch_set":11,"id":"ff0328f2_9e0f076d","line":100,"updated":"2022-10-08 14:32:40.000000000","message":"please close the parenthesis at new line\n  NULL,\n };","commit_id":"30509f417ebed151b5236e0b78147de5a3ac830a"},{"author":{"_account_id":1001881,"name":"James Smith","email":"jsmith@rallysmith.co.uk","username":"RallySmith"},"change_message_id":"b883cd92d0ad933ccd32f3c7c685550bf776dc9b","unresolved":false,"context_lines":[{"line_number":97,"context_line":"static const char * const target_cortex_m[] \u003d {"},{"line_number":98,"context_line":"\t\"cortex_m\","},{"line_number":99,"context_line":"\t\"hla_target\","},{"line_number":100,"context_line":"\tNULL };"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"static const char * const target_arm[] \u003d {"},{"line_number":103,"context_line":"\t\"cortex_a\","}],"source_content_type":"text/x-csrc","patch_set":11,"id":"51c9e688_9ce94b6b","line":100,"in_reply_to":"ff0328f2_9e0f076d","updated":"2022-10-08 16:43:34.000000000","message":"Done","commit_id":"30509f417ebed151b5236e0b78147de5a3ac830a"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"7f94121aa678977531b8aa5892f2cbb5dfebb49a","unresolved":true,"context_lines":[{"line_number":109,"context_line":"\t\"arm946e\","},{"line_number":110,"context_line":"\t\"arm966e\","},{"line_number":111,"context_line":"\t\"arm11\","},{"line_number":112,"context_line":"\tNULL };"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"/* Since individual eCos application configurations may have different thread"},{"line_number":115,"context_line":" * object structure layouts depending on the actual build-time enabled features"}],"source_content_type":"text/x-csrc","patch_set":11,"id":"abbeff62_5ef12de1","line":112,"updated":"2022-10-08 14:32:40.000000000","message":"same here","commit_id":"30509f417ebed151b5236e0b78147de5a3ac830a"},{"author":{"_account_id":1001881,"name":"James Smith","email":"jsmith@rallysmith.co.uk","username":"RallySmith"},"change_message_id":"b883cd92d0ad933ccd32f3c7c685550bf776dc9b","unresolved":false,"context_lines":[{"line_number":109,"context_line":"\t\"arm946e\","},{"line_number":110,"context_line":"\t\"arm966e\","},{"line_number":111,"context_line":"\t\"arm11\","},{"line_number":112,"context_line":"\tNULL };"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"/* Since individual eCos application configurations may have different thread"},{"line_number":115,"context_line":" * object structure layouts depending on the actual build-time enabled features"}],"source_content_type":"text/x-csrc","patch_set":11,"id":"0fc7badd_71e2136c","line":112,"in_reply_to":"abbeff62_5ef12de1","updated":"2022-10-08 16:43:34.000000000","message":"Done","commit_id":"30509f417ebed151b5236e0b78147de5a3ac830a"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"7f94121aa678977531b8aa5892f2cbb5dfebb49a","unresolved":true,"context_lines":[{"line_number":849,"context_line":"\t\t\tLOG_ERROR(\"Could not read eCos thread id from target\");"},{"line_number":850,"context_line":"\t\t\treturn retval;"},{"line_number":851,"context_line":"\t\t}"},{"line_number":852,"context_line":"\t\trtos-\u003ethread_details[tasks_found].threadid \u003d (threadid_t)thread_id;"},{"line_number":853,"context_line":""},{"line_number":854,"context_line":"\t\t/* Read the name pointer */"},{"line_number":855,"context_line":"\t\tretval \u003d target_read_buffer(rtos-\u003etarget,"}],"source_content_type":"text/x-csrc","patch_set":11,"id":"bc1218c5_2689927c","line":852,"updated":"2022-10-08 14:32:40.000000000","message":"I think there is no need for this cast. Do you have a compiler error/warning without it?","commit_id":"30509f417ebed151b5236e0b78147de5a3ac830a"},{"author":{"_account_id":1001881,"name":"James Smith","email":"jsmith@rallysmith.co.uk","username":"RallySmith"},"change_message_id":"b883cd92d0ad933ccd32f3c7c685550bf776dc9b","unresolved":false,"context_lines":[{"line_number":849,"context_line":"\t\t\tLOG_ERROR(\"Could not read eCos thread id from target\");"},{"line_number":850,"context_line":"\t\t\treturn retval;"},{"line_number":851,"context_line":"\t\t}"},{"line_number":852,"context_line":"\t\trtos-\u003ethread_details[tasks_found].threadid \u003d (threadid_t)thread_id;"},{"line_number":853,"context_line":""},{"line_number":854,"context_line":"\t\t/* Read the name pointer */"},{"line_number":855,"context_line":"\t\tretval \u003d target_read_buffer(rtos-\u003etarget,"}],"source_content_type":"text/x-csrc","patch_set":11,"id":"bf20bcf8_226b1438","line":852,"in_reply_to":"bc1218c5_2689927c","updated":"2022-10-08 16:43:34.000000000","message":"Done","commit_id":"30509f417ebed151b5236e0b78147de5a3ac830a"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"7f94121aa678977531b8aa5892f2cbb5dfebb49a","unresolved":true,"context_lines":[{"line_number":996,"context_line":"\t\t * information when the host is low on memory. However... */"},{"line_number":997,"context_line":"\t\tif (!eistr) {"},{"line_number":998,"context_line":"\t\t\tLOG_ERROR(\"OOM allocating extra information buffer\");"},{"line_number":999,"context_line":"\t\t\treturn -1;"},{"line_number":1000,"context_line":"\t\t}"},{"line_number":1001,"context_line":""},{"line_number":1002,"context_line":"\t\tint soff \u003d snprintf(eistr, eilen, \"State: %s\", state_desc);"}],"source_content_type":"text/x-csrc","patch_set":11,"id":"1252a187_8fff5bf0","line":999,"updated":"2022-10-08 14:32:40.000000000","message":"Even if the callers do not check the returned value, please here\n return ERROR_FAIL;","commit_id":"30509f417ebed151b5236e0b78147de5a3ac830a"},{"author":{"_account_id":1001881,"name":"James Smith","email":"jsmith@rallysmith.co.uk","username":"RallySmith"},"change_message_id":"b883cd92d0ad933ccd32f3c7c685550bf776dc9b","unresolved":false,"context_lines":[{"line_number":996,"context_line":"\t\t * information when the host is low on memory. However... */"},{"line_number":997,"context_line":"\t\tif (!eistr) {"},{"line_number":998,"context_line":"\t\t\tLOG_ERROR(\"OOM allocating extra information buffer\");"},{"line_number":999,"context_line":"\t\t\treturn -1;"},{"line_number":1000,"context_line":"\t\t}"},{"line_number":1001,"context_line":""},{"line_number":1002,"context_line":"\t\tint soff \u003d snprintf(eistr, eilen, \"State: %s\", state_desc);"}],"source_content_type":"text/x-csrc","patch_set":11,"id":"fc7260e3_7c78452c","line":999,"in_reply_to":"1252a187_8fff5bf0","updated":"2022-10-08 16:43:34.000000000","message":"Done","commit_id":"30509f417ebed151b5236e0b78147de5a3ac830a"}]}
