From kwrite-devel Fri Dec 11 14:46:18 2020 From: Milian Wolff Date: Fri, 11 Dec 2020 14:46:18 +0000 To: kwrite-devel Subject: using ktexteditor as a base for a disassembly viewer Message-Id: <53591533.DjNjmu2oIh () milian-workstation> X-MARC-Message: https://marc.info/?l=kwrite-devel&m=160769810521599 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--nextPart11403714.7tjibXJgbu" --nextPart11403714.7tjibXJgbu Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii"; protected-headers="v1" From: Milian Wolff To: kwrite-devel@kde.org Subject: using ktexteditor as a base for a disassembly viewer Date: Fri, 11 Dec 2020 15:46:18 +0100 Message-ID: <53591533.DjNjmu2oIh@milian-workstation> Hey all, I'm wondering what to use for hotspot to show a disassembly view. Basically this view consists of multiple columns: - address - instructions - costs (cycles, instructions, branch misses, whatever...) Initially I thought: Let's use a read-only ktexteditor part for this, as it will get us highlighting and copy'n'paste features for free. But we'd have to put the costs into ktexteditor annotations then, I guess? So I'm not so sure whether that's a good fit after all: While we get some features for free, we lose others, such as reordering of columns and selection of more. What would you use to build something like this: https://docs.wasmtime.dev/assets/perf-annotate-fib.png Ideally, we would even eventually get the ability to show the source code too, like here: https://chrisdietri.ch/img/perf-report-annotate2.png But I have to say that instead of the mixed view above, I much prefer godbolt's view: https://danlarkorg.files.wordpress.com/ 2020/10/2020-10-04-223128_947x626_scrot.png?w=947 So, any input and suggestions would be welcome on how to tackle this. PS: How would one even use KSyntaxHighlighting for rendering into a QAbstractItemView? That also sounds somewhat nasty hmmm -- Milian Wolff mail@milianw.de http://milianw.de --nextPart11403714.7tjibXJgbu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEezawi1aUvUGg3A1+8zYW/HGdOX8FAl/ThjoACgkQ8zYW/HGd OX/eaRAAyaV6+Ne7QpQpkwu/CQBYTcUgYai7qVfEWEGz7VV0NOZmzA2/HswDqAcX E38UQzbCDTDp/G7q7jd1sAwZk4E3YKF4zmolhPcmK4DENdLVqfEfuyZZ4LnHlmcU lZPq94KV6qT1g6D4BVNTvkbImfuQDwX2sJnK3gsVb/703Bik/zGwYtpw4TS7DjEF Rpxt7Jl5zA7cMaF3ixj3MrlJIu06w5fOuk5nbUIS20JG8iCsF3d8XS4++307x9Cm 9z/hf5PbZ057ICHP81hhA7XPKn/P81si9bo8Vpz6MtVdu/gqTqupXiaGkCZ4dhma 9I/RzgO12F7CXtZ6sQbl6ik+OR4yLQmwLWQ2dxM+In2tjklEmzILCfnNd0yCIt4g 9ZxFwaZCAPn9jzPLwzbgtSGpE4YRUO3vcTAkAzDyi6fGWnz8D/sEO9mJUSgCEBu6 TuKSRWAUNGpKN5071CQ86y0AP+x1a4HxZ2InCG+lWuBJ4aD7x0UUG1eaLeSPppqH uRM53PREroAJlmjCjgV6sN0YzOyigPGOv+J64zSpVBMlEmC9hgxHLraNgygEei1N TfoAxjojg4rm0sU9YC/AtSK4Y+ueJoqAigOR3SUZGLs159HI7LdeWTtYbbgwgOuA EevdKMAkoFXRyh9PpmvHZmI9U25Et2xuXQAlZBKbPWKLmQ2E1EY= =+YAZ -----END PGP SIGNATURE----- --nextPart11403714.7tjibXJgbu--