Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Watchpoint segfaults
@ 2005-12-09 19:58 Daniel Jacobowitz
  2005-12-10  8:31 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2005-12-09 19:58 UTC (permalink / raw)
  To: gdb

This is just a brain dump; I was going to fix this today, but it was only
tangential to the patch I was working on, and it turned out to be a real
rathole.

There are lots of ways to make gdb segfault with watchpoints.  Here's one of
the easiest to reproduce:

  file ./gdb
  watch object_files
  file
  info break

b->exp will be NULL because re-parsing the expression failed in
breakpoint_re_set_one.  When we go to print the expression we crash.
I think we want to temporarily disable breakpoints whose expression can't be
parsed, and print it as a string rather than using the expression printer.

A frequent cause of this in my debugging sessions is "watch *$33" followed
by something that rereads the symbol table; as Andrew S. noticed, that
clears the history.  Alternative to his patch coming right up which prevents
that particular case, by not clearing the history.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-12-10 19:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-09 19:58 Watchpoint segfaults Daniel Jacobowitz
2005-12-10  8:31 ` Eli Zaretskii
2005-12-10 15:57   ` Daniel Jacobowitz
2005-12-10 19:38     ` Eli Zaretskii
2005-12-10 19:58     ` Ramana Radhakrishnan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox