<NishanthMenon>
just adding to my query yesterday: adding -c "gdb_breakpoint_override hard" to openocd commandline helped me with kernel debug
<PaulFertser>
Oh, so software breakpoints were not a necessity.
<NishanthMenon>
PaulFertser: not really, i was not aware of gdb_breakpoint_override and was wondering what was going on..
<zear>
alternatively, you can tell gdb to treat the entire addressable memory as read-only, which will force hw breakpoints: `mem 0x0 0xffffffff ro`
<NishanthMenon>
zear: aah. did'nt know of that either. thanks
<zear>
(or just narrow it down to the area that's problematic)
<NishanthMenon>
zear: yeah - we were looking at centos kernel - two things that kicked us initially was coresight driver (takes control of coresight registers and that messes with openocd control) and KASLR (symbols were ofcourse not valid).. once we got past that looks like mmu protection is next in line. h/w breakpoints do the job well enough..
<zear>
How did you solve the coresight issue? I was once debugging an ARM board and JTAG connection would get lost at early Linux boot, around the time it touches coresight. Never managed to reliably get around that.
<NishanthMenon>
zear: just disabled coresight driver ;) -> I need to see further if there is a kernel cmdline option to set it up
<zear>
ah, that didn't help for my case IIRC
<NishanthMenon>
yeah - it should probably have a kernel cmdline that folks can set to not enable it