[RFC] Add --messages-live module to print MSG events
#149
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I believe this is one of the main features of QXDM, but there's very little open-source support for it. The only projects I'm aware of are qc_debug_monitor, which works well but doesn't support USB modems or the new Qshrink4 terse message format, and nano-dm, which I couldn't get to work at all because of many hardcoded chipset-specific command strings.
QCSuper seems to be the best-maintained open-source DIAG tool around, so including this feature seems natural. It does require a fair bit of new code, including 1) a custom printf implementation to recombine the format string and argument values exposed by the protocol, and 2) a parser for Qualcomm's Qshrink and Qshrink 4 database file formats, which contain out-of-band format strings for "terse" messages and can often be found in device GPL dumps.
The code's not quite ready to merge, but it's good enough to review. Here's a screenshot of what the output looks like for the command

./qcsuper.py --usb-modem 04e8:685d:1:2 --messages-live --qdb qdsp6m.qdbon a Galaxy S10e, withqdsp6m.qdbsourced from the phone's GPL source: