Hi all,
As the title says I am trying to debug some of the variables inside the codebase for Toy Ch2. For instance I want to see the output of variable name dataTypehere. How do I go about doing this?
I have tried the standard llvm::errs << dataType << "\n"; and rebuilt the project. But the error message does not shows up in the console when that function is running…
I think it does - used gdb to confirm to it. Also you’re right I meant llvm::errs(). Is there any other way I can see the output of the variable; say llvm:critical() or op->getWarning() or something else?
Here is the output of the gdb, for the above linked code
(gdb) break ConstantOp::build
Breakpoint 1 at 0x263f84 (2 locations)
(gdb) start
Temporary breakpoint 2 at 0x23f214
Starting program: build/tools/opt -emit=mlir example.toy
Temporary breakpoint 2, 0x000000000023f214 in main ()
(gdb) c
Continuing.
Breakpoint 1, 0x0000000000264164 in mlir::nnfls::ConstantOp::build(mlir::OpBuilder&, mlir::OperationState&, mlir::Type, mlir::DenseElementsAttr) ()