From: Daniel Jacobowitz <drow@false.org>
To: gdb@sourceware.org
Subject: Watchpoint segfaults
Date: Fri, 09 Dec 2005 19:58:00 -0000 [thread overview]
Message-ID: <20051209195811.GA19885@nevyn.them.org> (raw)
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
next reply other threads:[~2005-12-09 19:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-09 19:58 Daniel Jacobowitz [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051209195811.GA19885@nevyn.them.org \
--to=drow@false.org \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox