Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Pierre Muller \(IMAP\)" <muller@ics.u-strasbg.fr>
To: <gdb-patches@sourceware.org>, "'Eli Zaretskii'" <eliz@gnu.org>
Subject: [RFA] Fix troubles with watchpoints in DJGPP
Date: Wed, 27 May 2009 07:49:00 -0000	[thread overview]
Message-ID: <001401c9de9f$928b9f80$b7a2de80$@u-strasbg.fr> (raw)


  I finally managed to be able to compile current CVS
with DJGPP v2.03.

  I also tried to use it but I have several problems,
some are probably DJGPP specific
(bad file descriptor errors when trying to restart 
a ./gdb executable at level 2, meaning inside another gdb
itself being debugged by gdb).

  The reason of that email is the behavior for watchpoints:

  When I set a watchpoint before starting a program in cygwin,
the type is first set to 'software watchpoint'
and then modified to 'hardware_watchpoint' (if the watch memory size
is compatible with debug register limitations for i386) during 
initialization.
  But this does not happen for DJGPP
if I set a watchpoint before starting on a pointer,
it never is changed to a hardware watchpoint.

  After some debugging, I realized that 
DJGPP only calls insert_breakpoints ()
that does call update_watchpoint with reparse set to one,
after pushing go32 target,
while with cygwin, the DLL loaded caused a 
reloading of all breakpoints and triggered a
call to update_watchpoint with reparse = 1.


This one line patch fixes the problem.

Is this patch OK?


Pierre Muller
Pascal language support maintainer for GDB

PS-1) Are there not other native targets, without
dynamic libraries, that will suffer the same troubles?
PS-2) Eli,
do you have anything that could help me debug the
Bad file descriptor problems, like a library recording
file opening/closing using the DJGPP file system extensions?



ChangeLog entry:

2009-05-27  Pierre Muller  <muller@ics.u-strasbg.fr>

        * go32-nat.c (go32_create_inferior): Add call to breakpoint_re_set.

Index: go32-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/go32-nat.c,v
retrieving revision 1.76
diff -u -p -r1.76 go32-nat.c
--- go32-nat.c  21 May 2009 15:48:41 -0000      1.76
+++ go32-nat.c  27 May 2009 07:44:50 -0000
@@ -721,6 +721,7 @@ go32_create_inferior (struct target_ops
   add_thread_silent (inferior_ptid);

   clear_proceed_status ();
+  breakpoint_re_set ();
   insert_breakpoints ();
   prog_has_started = 1;
 }
~


             reply	other threads:[~2009-05-27  7:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-27  7:49 Pierre Muller (IMAP) [this message]
2009-05-27 19:25 ` Eli Zaretskii
2009-05-27 20:53   ` Pierre Muller
2009-05-28  8:21     ` Eli Zaretskii
2009-05-28  9:31       ` Pierre Muller
2009-05-28 13:27         ` Eli Zaretskii
2009-05-27 23:30 ` Pedro Alves
2009-05-28  8:08   ` Eli Zaretskii
2009-06-08 16:16   ` [RFA-v2] " Pierre Muller
2009-06-16 22:38     ` [PING][RFA-v2] " Pierre Muller
2009-06-16 22:59       ` Pedro Alves
2009-06-16 23:20         ` Pierre Muller
2009-06-16 23:46           ` Pedro Alves
2009-06-16 23:54             ` Pierre Muller
2009-06-17  0:05               ` Pedro Alves
2009-06-17  6:19                 ` Pierre Muller
2009-06-17 12:32             ` Joel Brobecker
2009-06-17 22:44               ` DJ Delorie

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='001401c9de9f$928b9f80$b7a2de80$@u-strasbg.fr' \
    --to=muller@ics.u-strasbg.fr \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@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