Closed ZejiaZheng closed 4 years ago
Ah I found this in the pdf paper:
void getLineInfo(char** file, uint32_t* line);
Closing the issue now.
I am glad this issue was resolved.
from nvbit.h
/* Get line information for a particular instruction offset if available,
* binary must be compiled with --generate-line-info (-lineinfo) */
bool nvbit_get_line_info(CUcontext cuctx, CUfunction cufunc, uint32_t offset,
char** file_name, char** dir_name, uint32_t* line);
If i add
-lineinfo
during nvcc compilation and disable all optimizations, would it be possible for nvbit to extract the lineinfo for each instruction?More details: I am trying to write a basic code coverage tool with nvbit. I can generate
cubin
file with nvcc and usenvdisasm --print-line-info vectorAdd.cubin
to get the intruction <=> line info correspondence, but the issue is that the instruction printed out from cubin and the instructions printed out from nvbit are not always matching. If nvbit can parse the lineinfo directly then this would be awesome.Thank you.