This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Problems with hardware watchpoint on ia32.



> Here are the patches, after which you can set hardware watchpoints on
> bit fields.  You will notice that these patches also augment the
> lazy-value trick suggested by Jim Blandy as a means to watch struct
> members; this is because that trick doesn't work for bit fields, and
> because I regard it generally fragile as far as watchpoints are
> considered (we depend on the assumption that GDB doesn't evaluate
> parent structures, but nothing in GDB's code suggests that this
> assumption will hold).

I hasten to point out that it's not *my* trick.  :)  That's just the
way the watchpoint code works.

Eli's test of the value's type is incorrect if the watch expression
contains a structure comparison, like (foo == bar) || (something
else), where foo and bar are structures.  In that case, there will be
a value of type "struct", not at the end of the value list, but which
should be watched in its entirety.

To say that "nothing in GDB's code suggests that this assumption will
hold" is too passive.  We should instead say, "Nothing in GDB's code
suggests that it would be difficult to make this assumption hold;
therefore, since it would be useful if it did hold, we will extend the
description of struct value with the requirement that non-lazy values
should contain only the portions of the objects actually used."

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]