I am generating an assembly code (.s file) throught llc tool. Is it possible to modify the .s file?
I want to print the stack frame to console or to an output file for a particular function and print specific register values at particular breakpoints. Any pointers would be appreciated.
Thank you for your time.
Not exactly sure I understand your question - but you can edit the .s file yourself/manually, but I guess that’s not what you’re asking for. You’re wondering if there are any command line arguments to llc, etc, that’d cause it to print comments (or stderr, or something else) with stack frame descriptions? Not that I know of. You might be able to modify LLVM to add that functionality, though - I’ve no idea how hard that might be.
There is someone who’s proposing adding some changes to llvm-objdump that would print out variable location information from the DWARF in the assembly listing ( https://reviews.llvm.org/D70720 ) which might cover your use case?