Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Pierre Muller" <muller@ics.u-strasbg.fr>
To: "'Eli Zaretskii'" <eliz@gnu.org>
Cc: <gdb-patches@sourceware.org>
Subject: RE: [RFA] Fix troubles with watchpoints in DJGPP
Date: Thu, 28 May 2009 09:31:00 -0000	[thread overview]
Message-ID: <000d01c9df77$107f4bd0$317de370$@u-strasbg.fr> (raw)
In-Reply-To: <834ov5sknk.fsf@gnu.org>



> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Eli Zaretskii
> Envoyé : Thursday, May 28, 2009 10:21 AM
> À : Pierre Muller
> Cc : gdb-patches@sourceware.org
> Objet : Re: [RFA] Fix troubles with watchpoints in DJGPP
> 
> > From: "Pierre Muller" <muller@ics.u-strasbg.fr>
> > Cc: <gdb-patches@sourceware.org>
> > Date: Wed, 27 May 2009 22:53:31 +0200
> >
> > (gdb) watch gdb_stderr
> > Watchpoint 1: gdb_stderr
> > (gdb) r
> > Starting program:
> e:/cygwin/usr/local/src/gdbcvs/djbuild/gdb/./gdb.exe
> > Watchpoint 1: gdb_stderr
> >
> > Old value = <unreadable>
> > New value = (struct ui_file *) 0x0
> > 0x00001a91 in start ()
> > (gdb) inf watch
> > Num     Type           Disp Enb Address    What
> > 1       watchpoint     keep y              gdb_stderr
> >         breakpoint already hit 1 time
> > (gdb) q
> 
> Thanks, but this example is for the second (and the main) problem you
> mention in your original message, the one with watchpoints.  You also
> reported another problem:
> 
> > > > (bad file descriptor errors when trying to restart
> > > > a ./gdb executable at level 2, meaning inside another gdb
> > > > itself being debugged by gdb).
> 
> Can you show an example of these ``bad file descriptor errors''?  I
> don't think I ever saw them.

  This one is more tricky, I only saw it with 3 levels of gdb.
And maybe watchpoints were needed too...
  I will try to find a reproducible way, but it might not be so easy.
 
> Thanks.
> 
> > > > 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?
> > >
> > > No, but you can put a breakpoint on the respective library
> functions,
> > > couldn't you?
> >
> >   I discovered that there is already something in
> > dbgcom.c, but I wanted to have dup and dup2 calls
> > be monitored also, as the problem seems related to
> > handles of that type... But dup and dup2
> > never generate a call to the FSEXT function,
> > which make it not useful for that :(
> 
> First, I meant to actually put a breakpoint on each of the functions
> you are interested in; that doesn't need any FSEXT hooks.  And second,
> I don't understand the nature of your problems with FSEXT: dup and
> dup2 do make a copy of the FSEXT hook of the original file descriptor,
> so if the original descriptor was hooked by an FSEXT, the duplicated
> descriptor will be hooked as well.  What am I missing?

  What I am missing is a FSEXT hook call inside dup 
so that I know that the return value of dup is used,
instead with current gdbcom.c code, I will only get a 
call to dbg_fsext when this handle is closed, but 
at that point, I would have no idea where this handle is coming from!

Pierre


  reply	other threads:[~2009-05-28  9:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-27  7:49 Pierre Muller (IMAP)
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 [this message]
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='000d01c9df77$107f4bd0$317de370$@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