This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Can i set a breakpoint when a member of a C struct is being assigned?
* ying lcs <yinglcs@gmail.com> [2007-07-30 05:20]:
> Hi,
>
> Can i set a breakpoint when a member of a C struct is being assigned?
>
> For example, i have a C struct in my code:
> struct myStruct{
> int type;
> };
>
> How can I break my debugging program when I have code like this:
>
> myStruct* p;
Set a breakpoint here. And add a watchpoint.
> p->type = 10;
Then GDB stops here.
Bernhard
--
lp1 on fire
-- One of the more obfuscated kernel messages