)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1002047,"name":"Evgeniy Naydanov","email":"eugnay@gmail.com","username":"en-sc"},"change_message_id":"01f4cb97ebf456c2089a9c9e21e31d82e116e5fd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"d750559d_0d7367bf","updated":"2024-10-10 19:37:37.000000000","message":"Thanks for the patch! A `configure` option to simplify coverage collection is a great idea.\n\nOn a side note: have you seen https://github.com/riscv-collab/riscv-openocd/commit/c3c76bfafa6612dc56b3914c9f93eb2a790ef87b (it\u0027s a similar commit in RISC-V OpenOCD).","commit_id":"74e9b2e35373b55b8568ac0b9f68abb9f10c8a22"},{"author":{"_account_id":1001667,"name":"Jan Matyas","email":"jan.matyas@codasip.com","username":"JanMatCodasip"},"change_message_id":"cf8018b93704b60f69b9b70b7e3260f4174fb44a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"a7c3d042_c4a9ad57","in_reply_to":"d750559d_0d7367bf","updated":"2024-10-18 06:35:56.000000000","message":"Thanks for the pointer to that commit.\n\nWhen this patch gets submitted, I will be happy to drop that extra commit in riscv-openocd (and this way reduce the differences between riscv-openocd and the upstream, at least a little).","commit_id":"74e9b2e35373b55b8568ac0b9f68abb9f10c8a22"},{"author":{"_account_id":1001667,"name":"Jan Matyas","email":"jan.matyas@codasip.com","username":"JanMatCodasip"},"change_message_id":"9b264b02795057ab715534de93f63272b4523583","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"e160e094_47c0b6ab","updated":"2024-10-25 06:17:01.000000000","message":"Hi Evgeniy, would you please find a moment to take another look?\n\nThank you.","commit_id":"b542f04eb24ccf9abb96d4e1c2fa0ad73e753be6"},{"author":{"_account_id":1002047,"name":"Evgeniy Naydanov","email":"eugnay@gmail.com","username":"en-sc"},"change_message_id":"3b44e1c5d46ee8699770fabc0e7a08845b05f8e4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"7fc70c4f_6a3afa6c","updated":"2024-11-11 18:27:20.000000000","message":"LGTM. Sorry for the delay.","commit_id":"b542f04eb24ccf9abb96d4e1c2fa0ad73e753be6"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"3a549e2478180099cc66bf56deb4334508533191","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"10d21ad8_04c1ebe3","updated":"2024-10-21 10:09:31.000000000","message":"Waiting for reply from Evgeniy...","commit_id":"b542f04eb24ccf9abb96d4e1c2fa0ad73e753be6"}],"configure.ac":[{"author":{"_account_id":1002047,"name":"Evgeniy Naydanov","email":"eugnay@gmail.com","username":"en-sc"},"change_message_id":"01f4cb97ebf456c2089a9c9e21e31d82e116e5fd","unresolved":true,"context_lines":[{"line_number":202,"context_line":""},{"line_number":203,"context_line":"AS_IF([test \"x$enable_gcov\" \u003d \"xyes\"], ["},{"line_number":204,"context_line":"  AC_DEFINE([USE_GCOV], [1], [1 to enable coverage collection using gcov.])"},{"line_number":205,"context_line":"  CFLAGS\u003d\"-O0 -g\""},{"line_number":206,"context_line":"], ["},{"line_number":207,"context_line":"  AC_DEFINE([USE_GCOV], [0], [0 to leave coverage collection disabled.])"},{"line_number":208,"context_line":"])"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"c8ac825c_344e2183","line":205,"updated":"2024-10-10 19:37:37.000000000","message":"1. AFAIK, It\u0027s better to collect coverage using `--coverage`, not `-O0 -g`.\nhttps://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-gcov\n2. Please, consider using `+\u003d` on `CFLAGS` instead of `\u003d` so that the user has more control.\n3. AFAIU, you also need `LDFLAGS +\u003d --coverage`.","commit_id":"74e9b2e35373b55b8568ac0b9f68abb9f10c8a22"},{"author":{"_account_id":1002047,"name":"Evgeniy Naydanov","email":"eugnay@gmail.com","username":"en-sc"},"change_message_id":"3b44e1c5d46ee8699770fabc0e7a08845b05f8e4","unresolved":false,"context_lines":[{"line_number":202,"context_line":""},{"line_number":203,"context_line":"AS_IF([test \"x$enable_gcov\" \u003d \"xyes\"], ["},{"line_number":204,"context_line":"  AC_DEFINE([USE_GCOV], [1], [1 to enable coverage collection using gcov.])"},{"line_number":205,"context_line":"  CFLAGS\u003d\"-O0 -g\""},{"line_number":206,"context_line":"], ["},{"line_number":207,"context_line":"  AC_DEFINE([USE_GCOV], [0], [0 to leave coverage collection disabled.])"},{"line_number":208,"context_line":"])"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"5707c017_ce2c75b4","line":205,"in_reply_to":"a1c98e4c_83b57f64","updated":"2024-11-11 18:27:20.000000000","message":"Understood. Thanks!","commit_id":"74e9b2e35373b55b8568ac0b9f68abb9f10c8a22"},{"author":{"_account_id":1001667,"name":"Jan Matyas","email":"jan.matyas@codasip.com","username":"JanMatCodasip"},"change_message_id":"cf8018b93704b60f69b9b70b7e3260f4174fb44a","unresolved":true,"context_lines":[{"line_number":202,"context_line":""},{"line_number":203,"context_line":"AS_IF([test \"x$enable_gcov\" \u003d \"xyes\"], ["},{"line_number":204,"context_line":"  AC_DEFINE([USE_GCOV], [1], [1 to enable coverage collection using gcov.])"},{"line_number":205,"context_line":"  CFLAGS\u003d\"-O0 -g\""},{"line_number":206,"context_line":"], ["},{"line_number":207,"context_line":"  AC_DEFINE([USE_GCOV], [0], [0 to leave coverage collection disabled.])"},{"line_number":208,"context_line":"])"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"a1c98e4c_83b57f64","line":205,"in_reply_to":"c8ac825c_344e2183","updated":"2024-10-18 06:35:56.000000000","message":"1. The `--coverage` argument was already present, please see `automake.am`. I have added a comment to explain why CFLAGS are adjusted also in Autoconf.\n\n2. Thanks, done.\n\n3. I had the LDFLAGS already covered in `automake.am`, altough I originally used different arguments than `--coverage` which are in fact synonyms. \n\n`man gcc` says: \"[--coverage] is a synonym for -fprofile-arcs -ftest-coverage (when compiling) and -lgcov (when linking).\".\n\nI have just changed it to use \"--coverage\" for both CLFAGS and LDFLAGS to make its meaning more clear to code readers.","commit_id":"74e9b2e35373b55b8568ac0b9f68abb9f10c8a22"}],"src/openocd.c":[{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"d431adc317f1afac6371d6f008e6422fa74b7f68","unresolved":true,"context_lines":[{"line_number":377,"context_line":""},{"line_number":378,"context_line":"#if USE_GCOV"},{"line_number":379,"context_line":"\t/* Always explicitly dump coverage data before terminating."},{"line_number":380,"context_line":"\t * Otherwise coverage would not be dumped when exit_on_signal occurs. */"},{"line_number":381,"context_line":"\tvoid __gcov_dump(void);"},{"line_number":382,"context_line":"\t__gcov_dump();"},{"line_number":383,"context_line":"#endif"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"803a74d1_baaee645","line":380,"updated":"2024-10-11 07:48:12.000000000","message":"this remembers me the discussion in\nhttps://review.openocd.org/c/openocd/+/4918\nWhy `exit_on_signal()` during a code coverage?\nIt exists the OpenOCD command `shutdown` that let it quit gracefully. Don\u0027t use `kill` or `CTRL-C` for such tests.\nCan this be explained in the documentation?","commit_id":"74e9b2e35373b55b8568ac0b9f68abb9f10c8a22"},{"author":{"_account_id":1001667,"name":"Jan Matyas","email":"jan.matyas@codasip.com","username":"JanMatCodasip"},"change_message_id":"cf8018b93704b60f69b9b70b7e3260f4174fb44a","unresolved":true,"context_lines":[{"line_number":377,"context_line":""},{"line_number":378,"context_line":"#if USE_GCOV"},{"line_number":379,"context_line":"\t/* Always explicitly dump coverage data before terminating."},{"line_number":380,"context_line":"\t * Otherwise coverage would not be dumped when exit_on_signal occurs. */"},{"line_number":381,"context_line":"\tvoid __gcov_dump(void);"},{"line_number":382,"context_line":"\t__gcov_dump();"},{"line_number":383,"context_line":"#endif"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"83bdb496_6ec75a9d","line":380,"in_reply_to":"803a74d1_baaee645","updated":"2024-10-18 06:35:56.000000000","message":"Even if OpenOCD execution ends with a signal (e.g. Ctrl-C), some work has been done and some code lines have been executed. So it makes sense to me to ask about code coverage in that case, same as when \"shutdown\" happens.\n\nFor example, a developer may wish to use the code coverage to confirm if expected cleanup routines were really executed when OpenOCD got stopped by a signal.\n\nFurthermore, it is IMO better to make the collection coverage work for signal terminations (that is, to prevent a special case) than to leave the special case unhandled and instead write documentation about it.","commit_id":"74e9b2e35373b55b8568ac0b9f68abb9f10c8a22"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"3a549e2478180099cc66bf56deb4334508533191","unresolved":false,"context_lines":[{"line_number":377,"context_line":""},{"line_number":378,"context_line":"#if USE_GCOV"},{"line_number":379,"context_line":"\t/* Always explicitly dump coverage data before terminating."},{"line_number":380,"context_line":"\t * Otherwise coverage would not be dumped when exit_on_signal occurs. */"},{"line_number":381,"context_line":"\tvoid __gcov_dump(void);"},{"line_number":382,"context_line":"\t__gcov_dump();"},{"line_number":383,"context_line":"#endif"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"96dc7c79_5ad1c928","line":380,"in_reply_to":"83bdb496_6ec75a9d","updated":"2024-10-21 10:09:31.000000000","message":"Indeed!","commit_id":"74e9b2e35373b55b8568ac0b9f68abb9f10c8a22"}]}
