public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: John Gilmore <gnu@toad.com>
To: Pedro Alves <palves@redhat.com>
Cc: Michal Lesniewski <m.lesniewski@samsung.com>,
	gdb@sourceware.org,   "'Yao Qi'" <yao@codesourcery.com>
Subject: Re: Implementation of different software breakpoint kinds in gdb server
Date: Fri, 19 Oct 2012 00:31:00 -0000	[thread overview]
Message-ID: <201210190028.q9J0Sd2N005583@new.toad.com> (raw)
In-Reply-To: <507FEF69.4030008@redhat.com>

> It's not the next_pc bits per se, but the run control stuff that always
> gets tricky.  Well, every time I think touching run control stuff in either
> gdb or gdbserver shouldn't be hard, I spend long whiles head banging.
> Maybe it's just me.  :-)

It's not just you.  For the first few years that I maintained GDB in
the 1990s, whenever I changed something in that big wait_for_inferior
jungle, I would introduce two bugs for every bug I fixed.  I got
pretty cautious about messing around in there.  Eventually I
started factoring the huge function into smaller functions, which
reduced the conceptual complexity somewhat.  Also, I gradually
got better at learning what would break it, and we also built up
a test suite that could test for obvious breakages.

> It'd be nice to avoid the duplication, though that might not be easy.

If you DO end up moving any of this infrastructure into the
target environment, I strongly recommend using common code.
It is hard enough to debug it once -- let alone debugging it
separately on each target as they evolve separate versions of
this very complicated code.

	John

  reply	other threads:[~2012-10-19  0:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-18  9:23 Michal Lesniewski
2012-10-18 10:08 ` Pedro Alves
2012-10-18 10:28   ` Yao Qi
2012-10-18 10:42     ` Pedro Alves
2012-10-18 11:44   ` Michal Lesniewski
2012-10-18 12:01     ` Pedro Alves
2012-10-19  0:31       ` John Gilmore [this message]
2012-10-19  8:51         ` Michal Lesniewski

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=201210190028.q9J0Sd2N005583@new.toad.com \
    --to=gnu@toad.com \
    --cc=gdb@sourceware.org \
    --cc=m.lesniewski@samsung.com \
    --cc=palves@redhat.com \
    --cc=yao@codesourcery.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).