Debug registers on FreeBSD
kostikbel at gmail.com
Thu Feb 18 15:12:44 UTC 2010
On Thu, Feb 18, 2010 at 09:44:24AM -0500, John Baldwin wrote:
> On Wednesday 17 February 2010 11:07:36 pm Anderson Eduardo wrote:
> > Hello Folks,
> > First, I'm starting in the world of the debugging FreeBSD Kernel and, I
> don't know to use kgdb and ddb properly and, I need set breakpoints using
> debug register. Those breakpoints in the all tasks.
> This last might be tricky to accomplish because cpu_switch() will swap out
> the debug registers if a thread is using them. However, you can easily
> manage hardware breakpoints from ddb using the 'hwatch' command. It is
> documented in ddb(4). kgdb doesn't support setting hardware watch points
> it seems. Note that you can try to use 'db_md_set_watchpoint()' from your
> kernel module (with DDB compiled into your kernel) if you want to set the
> address progammatically rather than via the 'hwatch' command in ddb.
I remember that ddb only sets %dr on the CPU it happens to execute.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20100218/ef7cb70d/attachment.pgp
More information about the freebsd-hackers