DavidSpickett wrote: Ok I'm happy with everything aside from testing. Thanks for explaining.
For tests, I don't care if the core file is full of interesting stuff, it can be hello world. I'm thinking you could take some vanilla QEMU example of bare metal RISC-V and use GDB's ability to dump a core file. Assuming that extends to bare metal. Then use https://llvm.org/docs/CommandGuide/llvm-objcopy.html#cmdoption-llvm-objcopy-add-section to add this specially formatted note with data you concoct from some script. Then you can be sure there's zero proprietary IP in there. And in fact...you could write the test such that it uses the normal core file as a template and invokes llvm-objcopy each time to add a new CSR section. One that's sparse, one that's not, etc, etc. Which means at least the CSR bit is programatically generated and better documents the section format in the process. ...which makes me wonder if you can patch this section into a Linux rv32 core file. The kernel knows how to write those and you're treating bare metal core files as Linux anyway. So: * Generate a core on rv32 Linux (without any downstream IP involved) * write python to generate a CSR section as a file * objcopy it into the linux core The other way is to go contribute support for this to GDB and/or the Linux kernel, or add ELF core authoring to LLDB. Which are most welcome, but tasks in their own right. https://github.com/llvm/llvm-project/pull/142932 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits