Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: Eli Zaretskii <eliz@gnu.org>, gdb-patches@sourceware.org
Subject: Re: [patch] ia64: Fix breakpoints memory shadow
Date: Tue, 25 Nov 2008 17:49:00 -0000	[thread overview]
Message-ID: <20081125061235.GC3946@adacore.com> (raw)
In-Reply-To: <20081122235450.GA17397@host0.dyn.jankratochvil.net>

> Still I rather found another defect compared to mem-break.c in the ia64
> breakpoints code.  It is another problem unrelated to the original intention
> of this ia64 patch.

Jan, please don't take it personally, I really appreciate the way
you are trying to make your patch better and better.  But since
this was unrelated, I really wished that you committed the first part
as approved, and then sent a followup patch that dealt with that part
on its own.  With the approach you took, I had to fish out the previous
version of the patch, and then compare the two patches to see exactly
what changed. And since I've always found that a diff of diff is some
kind of mental gymnastics, and the whole process is more work than just
looking at the subsequent patch, I had to delay the review until I had
30min of quiet time.

Anyway, back to the one important change:

> -  memcpy (&instr, bp_tgt->shadow_contents, sizeof instr);
> -  replace_slotN_contents (bundle, instr, slotnum);
> +  instr_breakpoint = slotN_contents (bundle_mem, slotnum);
> +  if (instr_breakpoint != IA64_BREAKPOINT)
> +    return -1;

I think we need to give the user a way to understand the error
message that returning -1 will cause. Otherwise, it's going to be
hard for the user to have a clue of why the debugger failed to
de-insert the breakpoint.  I propose a warning saying something
like this:

   cannot remove breakpoint at address %s, no break instruction at such address.

Cheers,
-- 
Joel


  reply	other threads:[~2008-11-25  6:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-28 17:52 Jan Kratochvil
2008-10-30  1:51 ` Joel Brobecker
2008-10-31  0:03   ` Jan Kratochvil
2008-11-01 18:54     ` Joel Brobecker
2008-11-11 20:20       ` Jan Kratochvil
2008-11-13 14:27         ` Joel Brobecker
2008-11-21  1:11           ` Jan Kratochvil
2008-11-22 18:35             ` Joel Brobecker
2008-11-22 19:08             ` Eli Zaretskii
2008-11-24  2:25               ` Joel Brobecker
2008-11-24  7:09                 ` Jan Kratochvil
2008-11-25 17:49                   ` Joel Brobecker [this message]
2008-11-27  0:41                     ` Jan Kratochvil

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=20081125061235.GC3946@adacore.com \
    --to=brobecker@adacore.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.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