Package: gdb
Version: 6.8-3

Summary: The latest gdb will usually crash as a consequence of a
         watchpoint outside the process's memory range. Older gdb's
         would sometimes try to disable the watchpoint instead.


In a debugging session of a large program, it is often necessary
to trace changes to memory locations with the watch command.
To make it work across modules/functions, it needs to be done
like this:

     gdb> p some->path->to[some].variable->location
     
     73
     
     gdb> p &some->path->to[some].variable->location
     
     (int*)0x12345678
     
     gdb> watch *(int*)0x12345678


Sometimes it is then necessary to restart the program in order
to find out how and when a 'bad' value has been set.

With the latest gdb, a watchpoint which points into allocated memory
that is not available at process start, will not only cause the
program but also gdb to crash and abort.

This is extremely annoying, because one loses the whole debugging
context (mainly other breakpoints) and has to reconstruct the
debugging session very painfully.


Wishlist for improvements:

1)  Don't let gdb crash on that
2)  Just disable the watchpoint if memory is not available on startup
3)  Automatically reenable the watchpoint when memory becomes
    available
4)  Provide a gdb command that combines the steps of
    a) take-address-of-an-object
    b) watch memory-where-object-is
    e.g. a command like
      watchbyaddr <expression>


Claus


-- 
Claus Fischer <claus.fisc...@clausfischer.com>
http://www.clausfischer.com/

Attachment: signature.asc
Description: Digital signature

Reply via email to