[klee-dev] get the absolute path of file in InstructionInfo

Frank Busse f.busse at imperial.ac.uk
Sun May 21 11:55:01 BST 2023


Hi Jiayi,


On Thu, 11 May 2023 22:48:28 +0800
王加益 <vineash30640 at gmail.com> wrote:

> I have a question about the `const std::string &file` in `struct
> InstructionInfo`. From my observation, this `file` is always a
> relative path, regardless of whether the file is in klee-uclibc, klee
> runtime, or my own testing subjects. For example, we have:
> 
>    - runtime/POSIX/fd.c
>    - ../lib/getopt.c
>    - libc/string/strcmp.c
> 
> This makes it difficult to analyze, especially in `run.istats`, as
> tools like kcachegrind cannot find the corresponding source code with
> relative paths. Is there a way to make the `file` absolute?

Either add a field for the directory to that struct (the directory is
in the debug info, you can see it at the end of assembly.ll) or
configure your kcachegrind to access those directories. I don't have it
at hand currently but it's sth. like View -> Settings -> Directory
Settings for Source Annotation.


Kind regards,

Frank



More information about the klee-dev mailing list