This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: [RFA] Don't reset watchpoint block on solib load.


> Cc: gdb-patches@sources.redhat.com
> From: Jim Blandy <jimb@codesourcery.com>
> Date: Wed, 28 Nov 2007 14:18:06 -0800
> 
> Now, if I later unload libx.so, the watchpoint should delete itself
> with an appropriate message, just as a watchpoint on a stack variable
> does when its frame is popped --- when a shared library is unloaded,
> that ends the lifetimes of the variables it defines, just as exiting a
> block ends the lifetimes of the variables defined in the block.

Actually, a more useful behavior would be to disable the watchpoint in
this case, and reenable it (and, possibly, re-parse the expression) if
the library gets loaded again.

Similarly when a watchpoint on a static variable, or an automatic
variable in the `main' function, goes out of scope, because the
program exits: it would be useful, at least as an option, to have the
watchpoint re-enabled when the program is restarted.


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