Re: [lldb-dev] Figure our what global and static variables are accessed by what functions (at runtime)

2019-01-10 Thread Peng Yu via lldb-dev
> Normally, a CPU only allows a very small (as in, ~4) watchpoints. So I > think this strategy is bound to fail. Thanks. I see there only 4 hardware watchpoints are supported on my machine. Is there a way to set software watchpoints? > If you really need dynamic information about this sort of

[lldb-dev] Figure our what global and static variables are accessed by what functions (at runtime)

2019-01-10 Thread Peng Yu via lldb-dev
Hi, I think that I can use the watchpoint command to set watchpoints on all global and static variables. Then run the lldb and parse the screen output to see what global and static variables are read/write-accessed by what functions. Is this a good strategy? Is there any other better ways to

[lldb-dev] C library for investigate the stack and function arguments in a readable format.

2019-01-27 Thread Peng Yu via lldb-dev
Hi, As running in a debugger is very slow, I compile my C source code to LLVM .ll code and manually insert some commands in the .ll file to inspect things that I am interested in. But the intrinsics offered by the LLVM langref is rather limited. https://llvm.org/docs/LangRef.html I am not sure