c - Not able to set breakpoint on some functions in kgdb setup -


itemprop = "text">

I have a qigraphy setup using two virtual machines, both of them are 6.4 percent (in fact the kilo db is the clone of the host target ) I am able to successfully connect to remote target and start debugging. I want to debug a RAID driver, especially raid456.ko. My problem is that I am able to set breakpoints on some functions after loading symbols of this raid456.ko by using the add-signal-file command under gdb, but I am not able to set breakpoints on some functions I am For example, I can set the breakpoint at the ops_run_biofill function, but not on the ops_run_biodrain function. Both are static functions and part of the raid5.c file. If I try to set a breakpoint on ops_run_biodrain, it shows:

(gdb) b ops_run_biodrain

The function "ops_run_biodrain" is not set to suspend the breakpoint on the shared library load in the future Do you? (Y or [n])

Why some functions can be debugged and why not something else?

[edit] -------------- ------- I examined the problem further and I came to know that we use NM utility You can find the name and virtual address of any symbol part of a specific object file. I tried nm at raid456.ko and found that the ops_run_biofill function is in the output of nm command, but ops_run_biodrain is not in the output. Does this mean ops_run_biodrain is not in raid456.ko? If so, why is not it part of raid456.ko? Ops_run_biodrain is not under any macro checks.

Given the problem, due to the compilation optimization, some symbols were not being detected. After disabling the optimization of the RAID driver, KGDB can detect those symbols and be able to set a breakpoint on them.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -