GNU bug report logs - #3650
M-x gdb unusable on Windows

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Jason Rumney <jasonr@HIDDEN>; dated Mon, 22 Jun 2009 14:10:05 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
bug reassigned from package `emacs' to `emacs,w32'. Request was from Glenn Morris <rgm@HIDDEN> to control@HIDDEN. Full text available.

Message received at 3650@HIDDEN:


Received: (at 3650) by emacsbugs.donarmstrong.com; 25 Jun 2009 07:51:29 +0000
From handa@HIDDEN Thu Jun 25 00:51:28 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-3.5 required=4.0 tests=AWL,HAS_BUG_NUMBER,
	SPF_HELO_PASS autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from mx1.aist.go.jp (mx1.aist.go.jp [150.29.246.133])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5P7pOZr029509
	for <3650@HIDDEN>; Thu, 25 Jun 2009 00:51:25 -0700
Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123])
	by mx1.aist.go.jp  with ESMTP id n5P7pM42014656;
	Thu, 25 Jun 2009 16:51:22 +0900 (JST)
	env-from (handa@HIDDEN)
Received: from smtp4.aist.go.jp
	by rqsmtp2.aist.go.jp  with ESMTP id n5P7pMfE014485;
	Thu, 25 Jun 2009 16:51:22 +0900 (JST)
	env-from (handa@HIDDEN)
Received: 
	by smtp4.aist.go.jp  with ESMTP id n5P7pM4o014627;
	Thu, 25 Jun 2009 16:51:22 +0900 (JST)
	env-from (handa@HIDDEN)
Received: from handa by etlken with local (Exim 4.69)
	(envelope-from <handa@HIDDEN>)
	id 1MJjju-0003rZ-9G; Thu, 25 Jun 2009 16:51:22 +0900
From: Kenichi Handa <handa@HIDDEN>
To: nickrob@HIDDEN (Nick Roberts)
CC: 3650 <at> debbugs.gnu.org
In-reply-to: <19011.5534.127890.563311@HIDDEN>
	(nickrob@HIDDEN)
Subject: Re: bug#3650: M-x gdb unusable on Windows
References: <49FF3340.2040008@HIDDEN>
	<4A005A64.5050908@HIDDEN>
	<E1M6Epf-0003UC-Jj@etlken>
	<4A3F1B05.7030105@HIDDEN>
	<E1MIhbi-0003zl-1D@etlken>
	<4A3F7058.902@HIDDEN>
	<E1MIizy-00049S-1j@etlken>
	<4A3F81AC.1070404@HIDDEN>
	<4A3F8EAC.5010009@HIDDEN>
	<19008.29091.473126.629092@HIDDEN>
	<E1MJ5wr-0007eb-Qn@etlken>
	<E1MJhrI-0003cM-OR@etlken> <19011.5534.127890.563311@HIDDEN>
Message-Id: <E1MJjju-0003rZ-9G@etlken>
Date: Thu, 25 Jun 2009 16:51:22 +0900

In article <19011.5534.127890.563311@HIDDEN>, nickrob@HIDDEN (Nick Roberts) writes:

> Kenichi Handa writes:
> In article <E1MJ5wr-0007eb-Qn@etlken>, Kenichi Handa <handa@HIDDEN> writes:
> 
> > But, still C-c C-n in *gud* buffer, C-x C-a C-b in a source
> > file buffer don't work.
> 
> I've just found that, with the latest code, they don't work
> even on GNU/Linux, they show the same behaviour as on
> Windows.  But, with the code of EMACS_23_1_RC, those
> commands work on GNU/Linux.  I'm now building EMACS_23_1_RC
> on Windows to check if they work.

> Some things won't work for a while on trunk as there are major changes
> happening there now:

> gdb-ui.el           ->      gdb-mi.el
> Annotations         ->      GDB/MI
> gdb - annotate=3    ->      gdb -i=mi

Thank you for the info.  I found that when I use gud in
EMACS_23_1_RC, those commands work on Windows, but pp and pr
commands doesn't work even if what I'm debugging is emacs of
the trunk (thus debug_print of that emacs has fflush
(stderr)).  Strange.

So, I'm now debugging Emacs on Windows with emacs of the
trunk but using gud and gdb-ui of EMACS_23_1_RC.  It seems
that this combination works perfectly.

---
Kenichi Handa
handa@HIDDEN



Acknowledgement sent to Kenichi Handa <handa@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#3650; Package emacs. Full text available.

Message received at 3650@HIDDEN:


Received: (at 3650) by emacsbugs.donarmstrong.com; 25 Jun 2009 06:13:57 +0000
From nickrob@HIDDEN Wed Jun 24 23:13:57 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-4.7 required=4.0 tests=AWL,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from viper.snap.net.nz (viper.snap.net.nz [202.37.101.25] (may be forged))
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5P6DrUr013136
	for <3650@HIDDEN>; Wed, 24 Jun 2009 23:13:54 -0700
Received: from totara (203.29.255.123.dynamic.snap.net.nz [123.255.29.203])
	by viper.snap.net.nz (Postfix) with ESMTP id 346C53D9F70;
	Thu, 25 Jun 2009 18:13:51 +1200 (NZST)
Received: by totara (Postfix, from userid 1000)
	id 2EC0FC13F; Thu, 25 Jun 2009 18:13:50 +1200 (NZST)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <19011.5534.127890.563311@HIDDEN>
Date: Thu, 25 Jun 2009 18:13:50 +1200
To: Kenichi Handa <handa@HIDDEN>
Cc: 3650 <at> debbugs.gnu.org
Subject: Re: bug#3650: M-x gdb unusable on Windows
In-Reply-To: <E1MJhrI-0003cM-OR@etlken>
References: <49FF3340.2040008@HIDDEN>
	<4A005A64.5050908@HIDDEN>
	<E1M6Epf-0003UC-Jj@etlken>
	<4A3F1B05.7030105@HIDDEN>
	<E1MIhbi-0003zl-1D@etlken>
	<4A3F7058.902@HIDDEN>
	<E1MIizy-00049S-1j@etlken>
	<4A3F81AC.1070404@HIDDEN>
	<4A3F8EAC.5010009@HIDDEN>
	<19008.29091.473126.629092@HIDDEN>
	<E1MJ5wr-0007eb-Qn@etlken>
	<E1MJhrI-0003cM-OR@etlken>
X-Mailer: VM 7.19 under Emacs 22.2.1
From: nickrob@HIDDEN (Nick Roberts)

Kenichi Handa writes:
 > In article <E1MJ5wr-0007eb-Qn@etlken>, Kenichi Handa <handa@HIDDEN> writes:
 > 
 > > But, still C-c C-n in *gud* buffer, C-x C-a C-b in a source
 > > file buffer don't work.
 > 
 > I've just found that, with the latest code, they don't work
 > even on GNU/Linux, they show the same behaviour as on
 > Windows.  But, with the code of EMACS_23_1_RC, those
 > commands work on GNU/Linux.  I'm now building EMACS_23_1_RC
 > on Windows to check if they work.

Some things won't work for a while on trunk as there are major changes
happening there now:

gdb-ui.el           ->      gdb-mi.el
Annotations         ->      GDB/MI
gdb - annotate=3    ->      gdb -i=mi

Some of this work is being done by Dmitry Dzhus as part of the Google Summer
of Code project "Emacs GDB/MI migration":

http://socghop.appspot.com/student_project/show/google/gsoc2009/karlberry/t124022551883

-- 
Nick                                           http://www.inet.net.nz/~nickrob



Acknowledgement sent to nickrob@HIDDEN (Nick Roberts):
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#3650; Package emacs. Full text available.

Message received at 3650@HIDDEN:


Received: (at 3650) by emacsbugs.donarmstrong.com; 25 Jun 2009 05:51:00 +0000
From handa@HIDDEN Wed Jun 24 22:50:59 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-3.5 required=4.0 tests=AWL,HAS_BUG_NUMBER,
	SPF_HELO_PASS autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from mx1.aist.go.jp (mx1.aist.go.jp [150.29.246.133])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5P5otfE009072
	for <3650@HIDDEN>; Wed, 24 Jun 2009 22:50:56 -0700
Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123])
	by mx1.aist.go.jp  with ESMTP id n5P5oriV019159;
	Thu, 25 Jun 2009 14:50:53 +0900 (JST)
	env-from (handa@HIDDEN)
Received: from smtp4.aist.go.jp
	by rqsmtp2.aist.go.jp  with ESMTP id n5P5orwI022820;
	Thu, 25 Jun 2009 14:50:53 +0900 (JST)
	env-from (handa@HIDDEN)
Received: 
	by smtp4.aist.go.jp  with ESMTP id n5P5oq4m020440;
	Thu, 25 Jun 2009 14:50:52 +0900 (JST)
	env-from (handa@HIDDEN)
Received: from handa by etlken with local (Exim 4.69)
	(envelope-from <handa@HIDDEN>)
	id 1MJhrI-0003cM-OR; Thu, 25 Jun 2009 14:50:52 +0900
From: Kenichi Handa <handa@HIDDEN>
To: 3650 <at> debbugs.gnu.org
CC: nickrob@HIDDEN
In-reply-to: <E1MJ5wr-0007eb-Qn@etlken> (message from Kenichi Handa on Tue, 23
	Jun 2009 22:22:05 +0900)
Subject: Re: bug#3650: M-x gdb unusable on Windows
References: <49FF3340.2040008@HIDDEN> <4A005A64.5050908@HIDDEN>
	<E1M6Epf-0003UC-Jj@etlken> <4A3F1B05.7030105@HIDDEN>
	<E1MIhbi-0003zl-1D@etlken> <4A3F7058.902@HIDDEN>
	<E1MIizy-00049S-1j@etlken> <4A3F81AC.1070404@HIDDEN>
	<4A3F8EAC.5010009@HIDDEN>
	<19008.29091.473126.629092@HIDDEN> <E1MJ5wr-0007eb-Qn@etlken>
Message-Id: <E1MJhrI-0003cM-OR@etlken>
Date: Thu, 25 Jun 2009 14:50:52 +0900

In article <E1MJ5wr-0007eb-Qn@etlken>, Kenichi Handa <handa@HIDDEN> writes:

> But, still C-c C-n in *gud* buffer, C-x C-a C-b in a source
> file buffer don't work.

I've just found that, with the latest code, they don't work
even on GNU/Linux, they show the same behaviour as on
Windows.  But, with the code of EMACS_23_1_RC, those
commands work on GNU/Linux.  I'm now building EMACS_23_1_RC
on Windows to check if they work.

---
Kenichi Handa
handa@HIDDEN



Acknowledgement sent to Kenichi Handa <handa@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#3650; Package emacs. Full text available.

Message received at 3650@HIDDEN:


Received: (at 3650) by emacsbugs.donarmstrong.com; 24 Jun 2009 01:29:46 +0000
From happylibaoliang@HIDDEN Tue Jun 23 18:29:46 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=0.1 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from mail-ew0-f226.google.com (mail-ew0-f226.google.com [209.85.219.226])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5O1TfJO002879
	for <3650@HIDDEN>; Tue, 23 Jun 2009 18:29:43 -0700
Received: by ewy26 with SMTP id 26so736603ewy.1
        for <3650@HIDDEN>; Tue, 23 Jun 2009 18:29:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:mime-version:received:in-reply-to:references
         :date:message-id:subject:from:to:cc:content-type
         :content-transfer-encoding;
        bh=B3fkO4/ovKVAOiLVB5ObceGZLagIsu8b8Z/PE+iehZM=;
        b=CLPRVp3mLwLviYj+LYvbjfwK+YNbMCAL/dPAWx/1Uk5dQ960Phm6CATGh3j1a5UzUW
         3qpX2US7ZtNZs8FpJtMJO+GHXa8ma7Hs6SD24zU2d6gt7oUiXMjZcl/qq15NqZTtp7wy
         NYuB1CW7w0twlFct/K3PXd0Vhd2m6ZvjmJpAY=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :cc:content-type:content-transfer-encoding;
        b=wgGXxdVE0K84VXogRfnd+oAskczBabrXmHeexZxVobDBSRezCTtYzGEhiobEf90tUz
         2y0zCbs9YIFmtX/UH1uyt6i7RRfX8qQkuPStlVDu2wPXaPfVqJk7vPqiT6RbdLltQ4ic
         cNKvG+LXlMqZMj0/5uVT0Q2YBmu71mfh6lkAE=
MIME-Version: 1.0
Received: by 10.216.50.76 with SMTP id y54mr216239web.70.1245806975800; Tue, 
	23 Jun 2009 18:29:35 -0700 (PDT)
In-Reply-To: <200906231708.n5NH871m015109@HIDDEN>
References: <49FF3340.2040008@HIDDEN> <4A3F1B05.7030105@HIDDEN>
	 <E1MIhbi-0003zl-1D@etlken> <4A3F7058.902@HIDDEN>
	 <E1MIizy-00049S-1j@etlken> <4A3F81AC.1070404@HIDDEN>
	 <4A3F8EAC.5010009@HIDDEN>
	 <19008.29091.473126.629092@HIDDEN>
	 <E1MJ5wr-0007eb-Qn@etlken>
	 <200906231708.n5NH871m015109@HIDDEN>
Date: Wed, 24 Jun 2009 09:29:35 +0800
Message-ID: <21235fb0906231829w75fff6e1t56597359505ee6c3@HIDDEN>
Subject: Re: bug#3650: M-x gdb unusable on Windows
From: =?GB2312?B?wO6xpsHB?= <happylibaoliang@HIDDEN>
To: Dan Nicolaescu <dann@HIDDEN>, 3650 <at> debbugs.gnu.org
Cc: Kenichi Handa <handa@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

excuse me ,but how can i unsubscribe this mailing list?

2009/6/24, Dan Nicolaescu <dann@HIDDEN>:
> Kenichi Handa <handa@HIDDEN> writes:
>
>   > In article <19008.29091.473126.629092@HIDDEN>,
> nickrob@HIDDEN (Nick Roberts) writes:
>   >
>   > > >> By the way, I also installed gdb-6.8-mingw-3.tar.bz2.  But,
>   > > >> with "M-x gdb", pp and pr commands doesn't work.  They print
>   > > >> nothing.  They do work when gdb is invoked from command
>   > > >> line.  Do you know what is wrong?
>   >
>   > > Are you sure they print nothing or is it just that the output isn't
>   > > being flushed?  The commentary in gdb-ui.el has some advice about
> using
>   > > Emacs and GDB on Windows:
>   >
>   > >   ;; If you are using Emacs and GDB on Windows you will need to flush
> the buffer
>   > >   ;; explicitly in your program if you want timely display of I/O in
> Emacs.
>   > >   ;; Alternatively you can make the output stream unbuffered, for
> example, by
>   > >   ;; using a macro:
>   >
>   > >   ;;           #ifdef UNBUFFERED
>   > >   ;;	     setvbuf (stdout, (char *) NULL, _IONBF, 0);
>   > >   ;;	     #endif
>   >
>   > >   ;; and compiling with -DUNBUFFERED while debugging.
>   >
>   > Thank you for the info.  When I added "fflush (stderr);" at
>   > the end of the function debug_print, pp and pr commands
>   > started to work on Windows (mingw).
>   >
>   > But, still C-c C-n in *gud* buffer, C-x C-a C-b in a source
>   > file buffer don't work.
>   >
>   > When I type C-c C-n in *gud* buffer,
>   >   "error in process filter: Unexpected `starting' annocation"
>   > is shown in the echo area, and no command is accepted here
>   > after.
>
> I hit this regularly when running gdb against a simulator (i.e. slow
> response from the target) and type
> c RET c RET
> fast, so the second c comes before hitting the next breakpoint.  It
> seems that gud gets confused in interpreting the response from gdb...
>
> After that anything I type print the result of "info breakpoints".
>
>   > When I type C-x C-a C-b in a source file buffer, the gdb
>   > prompt in *gud* buffer is erased, and any further commands
>   > in *gud* just show the same output as "br info", and the
>   > menu bar keep flushing.
>
> Sometimes typing
> quit RET
> and then answering "no" will clear things up and it's possible to
> continue... but this is just a hack...
>
>
>
>
>
>



Acknowledgement sent to 李宝亮 <happylibaoliang@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#3650; Package emacs. Full text available.

Message received at 3650@HIDDEN:


Received: (at 3650) by emacsbugs.donarmstrong.com; 23 Jun 2009 17:08:28 +0000
From dann@HIDDEN Tue Jun 23 10:08:27 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-7.1 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER,
	X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from barrelv2.ics.uci.edu (barrelv2.ics.uci.edu [128.195.1.114])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5NH8NC9008655
	for <3650@HIDDEN>; Tue, 23 Jun 2009 10:08:24 -0700
Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101])
	by barrelv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n5NH878f018807;
	Tue, 23 Jun 2009 10:08:07 -0700 (PDT)
Received: (from dann@localhost)
	by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n5NH871m015109;
	Tue, 23 Jun 2009 10:08:07 -0700 (PDT)
Date: Tue, 23 Jun 2009 10:08:07 -0700 (PDT)
Message-Id: <200906231708.n5NH871m015109@HIDDEN>
From: Dan Nicolaescu <dann@HIDDEN>
To: Kenichi Handa <handa@HIDDEN>
Cc: 3650 <at> debbugs.gnu.org, Nick Roberts <nickrob@HIDDEN>
Subject: Re: bug#3650: M-x gdb unusable on Windows
References: <49FF3340.2040008@HIDDEN> <4A005A64.5050908@HIDDEN>
	<E1M6Epf-0003UC-Jj@etlken> <4A3F1B05.7030105@HIDDEN>
	<E1MIhbi-0003zl-1D@etlken> <4A3F7058.902@HIDDEN>
	<E1MIizy-00049S-1j@etlken> <4A3F81AC.1070404@HIDDEN>
	<4A3F8EAC.5010009@HIDDEN>
	<19008.29091.473126.629092@HIDDEN>
	<E1MJ5wr-0007eb-Qn@etlken>
X-Debbugs-No-Ack: yes
In-Reply-To: <E1MJ5wr-0007eb-Qn@etlken> (Kenichi Handa's message of "Tue, 23
	Jun 2009 22:22:05 +0900")
Lines: 55
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-ICS-MailScanner-Information: Please contact the ISP for more information
X-ICS-MailScanner-ID: n5NH878f018807
X-ICS-MailScanner: Found to be clean
X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.286,
	required 5, autolearn=disabled, ALL_TRUSTED -1.44, TW_TV 0.08,
	TW_VB 0.08)
X-ICS-MailScanner-From: dann@HIDDEN

Kenichi Handa <handa@HIDDEN> writes:

  > In article <19008.29091.473126.629092@HIDDEN>, nickrob@HIDDEN (Nick Roberts) writes:
  > 
  > > >> By the way, I also installed gdb-6.8-mingw-3.tar.bz2.  But,
  > > >> with "M-x gdb", pp and pr commands doesn't work.  They print
  > > >> nothing.  They do work when gdb is invoked from command
  > > >> line.  Do you know what is wrong?
  > 
  > > Are you sure they print nothing or is it just that the output isn't
  > > being flushed?  The commentary in gdb-ui.el has some advice about using
  > > Emacs and GDB on Windows:
  > 
  > >   ;; If you are using Emacs and GDB on Windows you will need to flush the buffer
  > >   ;; explicitly in your program if you want timely display of I/O in Emacs.
  > >   ;; Alternatively you can make the output stream unbuffered, for example, by
  > >   ;; using a macro:
  > 
  > >   ;;           #ifdef UNBUFFERED
  > >   ;;	     setvbuf (stdout, (char *) NULL, _IONBF, 0);
  > >   ;;	     #endif
  > 
  > >   ;; and compiling with -DUNBUFFERED while debugging.
  > 
  > Thank you for the info.  When I added "fflush (stderr);" at
  > the end of the function debug_print, pp and pr commands
  > started to work on Windows (mingw).
  > 
  > But, still C-c C-n in *gud* buffer, C-x C-a C-b in a source
  > file buffer don't work.
  > 
  > When I type C-c C-n in *gud* buffer,
  >   "error in process filter: Unexpected `starting' annocation"
  > is shown in the echo area, and no command is accepted here
  > after.

I hit this regularly when running gdb against a simulator (i.e. slow
response from the target) and type
c RET c RET 
fast, so the second c comes before hitting the next breakpoint.  It
seems that gud gets confused in interpreting the response from gdb...

After that anything I type print the result of "info breakpoints".

  > When I type C-x C-a C-b in a source file buffer, the gdb
  > prompt in *gud* buffer is erased, and any further commands
  > in *gud* just show the same output as "br info", and the
  > menu bar keep flushing.

Sometimes typing
quit RET
and then answering "no" will clear things up and it's possible to
continue... but this is just a hack...





Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#3650; Package emacs. Full text available.

Message received at 3650@HIDDEN:


Received: (at 3650) by emacsbugs.donarmstrong.com; 23 Jun 2009 13:22:13 +0000
From handa@HIDDEN Tue Jun 23 06:22:13 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-3.5 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER,
	SPF_HELO_PASS autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from mx1.aist.go.jp (mx1.aist.go.jp [150.29.246.133])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5NDM85Y030791
	for <3650@HIDDEN>; Tue, 23 Jun 2009 06:22:10 -0700
Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123])
	by mx1.aist.go.jp  with ESMTP id n5NDM6Ue016330;
	Tue, 23 Jun 2009 22:22:06 +0900 (JST)
	env-from (handa@HIDDEN)
Received: from smtp4.aist.go.jp
	by rqsmtp2.aist.go.jp  with ESMTP id n5NDM6it014658;
	Tue, 23 Jun 2009 22:22:06 +0900 (JST)
	env-from (handa@HIDDEN)
Received: 
	by smtp4.aist.go.jp  with ESMTP id n5NDM5om004669;
	Tue, 23 Jun 2009 22:22:06 +0900 (JST)
	env-from (handa@HIDDEN)
Received: from handa by etlken with local (Exim 4.69)
	(envelope-from <handa@HIDDEN>)
	id 1MJ5wr-0007eb-Qn; Tue, 23 Jun 2009 22:22:05 +0900
From: Kenichi Handa <handa@HIDDEN>
To: Nick Roberts <nickrob@HIDDEN>, 3650 <at> debbugs.gnu.org
CC: jasonr@HIDDEN
In-reply-to: <19008.29091.473126.629092@HIDDEN>
	(nickrob@HIDDEN)
Subject: Re: bug#3650: M-x gdb unusable on Windows
References: <49FF3340.2040008@HIDDEN> <4A005A64.5050908@HIDDEN>
	<E1M6Epf-0003UC-Jj@etlken> <4A3F1B05.7030105@HIDDEN>
	<E1MIhbi-0003zl-1D@etlken> <4A3F7058.902@HIDDEN>
	<E1MIizy-00049S-1j@etlken> <4A3F81AC.1070404@HIDDEN>
	<4A3F8EAC.5010009@HIDDEN> <19008.29091.473126.629092@HIDDEN>
Message-Id: <E1MJ5wr-0007eb-Qn@etlken>
Date: Tue, 23 Jun 2009 22:22:05 +0900

In article <19008.29091.473126.629092@HIDDEN>, nickrob@HIDDEN (Nick Roberts) writes:

> >> By the way, I also installed gdb-6.8-mingw-3.tar.bz2.  But,
> >> with "M-x gdb", pp and pr commands doesn't work.  They print
> >> nothing.  They do work when gdb is invoked from command
> >> line.  Do you know what is wrong?

> Are you sure they print nothing or is it just that the output isn't
> being flushed?  The commentary in gdb-ui.el has some advice about using
> Emacs and GDB on Windows:

>   ;; If you are using Emacs and GDB on Windows you will need to flush the buffer
>   ;; explicitly in your program if you want timely display of I/O in Emacs.
>   ;; Alternatively you can make the output stream unbuffered, for example, by
>   ;; using a macro:

>   ;;           #ifdef UNBUFFERED
>   ;;	     setvbuf (stdout, (char *) NULL, _IONBF, 0);
>   ;;	     #endif

>   ;; and compiling with -DUNBUFFERED while debugging.

Thank you for the info.  When I added "fflush (stderr);" at
the end of the function debug_print, pp and pr commands
started to work on Windows (mingw).

But, still C-c C-n in *gud* buffer, C-x C-a C-b in a source
file buffer don't work.

When I type C-c C-n in *gud* buffer,
  "error in process filter: Unexpected `starting' annocation"
is shown in the echo area, and no command is accepted here
after.

When I type C-x C-a C-b in a source file buffer, the gdb
prompt in *gud* buffer is erased, and any further commands
in *gud* just show the same output as "br info", and the
menu bar keep flushing.

---
Kenichi Handa
handa@HIDDEN



Acknowledgement sent to Kenichi Handa <handa@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#3650; Package emacs. Full text available.

Message received at 3650@HIDDEN:


Received: (at 3650) by emacsbugs.donarmstrong.com; 23 Jun 2009 08:00:08 +0000
From jasonrumney@HIDDEN Tue Jun 23 01:00:08 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-1.1 required=4.0 tests=AWL,HAS_BUG_NUMBER,
	RCVD_IN_SBLXBL,RCVD_IN_SBLXBL_CBL autolearn=unavailable
	version=3.2.5-bugs.debian.org_2005_01_02
Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.225])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5N804DL002260
	for <3650@HIDDEN>; Tue, 23 Jun 2009 01:00:05 -0700
Received: by rv-out-0506.google.com with SMTP id f6so39345rvb.1
        for <3650@HIDDEN>; Tue, 23 Jun 2009 01:00:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:received:received:sender:message-id:date:from
         :user-agent:mime-version:to:cc:subject:references:in-reply-to
         :content-type:content-transfer-encoding;
        bh=frEb4jJ6zTrPEXPaMrdZECOYNX7tdDpHd5DdWrb+rk0=;
        b=ExB7pDqBxymuMM95FmK6c0nO86+orjk6XNf0Z8G9br6ujk5MhrlSP+l/ir35QlUDrC
         7V3sQDdgrnbWnbZ0JIPVcoejAWPdeMwK477QMcNJiM5BjtNtfk+LxNJEbcv7xETqKDIc
         KsZ1zsPgd2vpU8U4FjlK/FNOk1gJ8rAneWeFM=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject
         :references:in-reply-to:content-type:content-transfer-encoding;
        b=VaeTiNoOZ8/0tdNtLtcbcCnakEfj4MBovMzdevXvYFNt4W++kOQ7v4zoeAN2e0rDXH
         t9hMkLPqqM3LFbMyZtsCt1Pn4vxw+HoCbiPU+Q0TuGaBUfUroNL39NDOy7NOGGcLmynr
         A+ji5m3cfe0SfCOh7euLRTikDAN9m6af0Fqpg=
Received: by 10.140.174.11 with SMTP id w11mr6511104rve.83.1245744003750;
        Tue, 23 Jun 2009 01:00:03 -0700 (PDT)
Received: from ?10.1.1.112? ([61.4.103.130])
        by mx.google.com with ESMTPS id k2sm14461174rvb.2.2009.06.23.01.00.01
        (version=TLSv1/SSLv3 cipher=RC4-MD5);
        Tue, 23 Jun 2009 01:00:03 -0700 (PDT)
Sender: Jason Rumney <jasonrumney@HIDDEN>
Message-ID: <4A408B5F.5090307@HIDDEN>
Date: Tue, 23 Jun 2009 15:59:27 +0800
From: Jason Rumney <jasonr@HIDDEN>
User-Agent: Thunderbird 2.0.0.21 (Windows/20090302)
MIME-Version: 1.0
To: Nick Roberts <nickrob@HIDDEN>
CC: 3650 <at> debbugs.gnu.org,
        emacs-pretest-bug <emacs-pretest-bug@HIDDEN>
Subject: Re: bug#3650: M-x gdb unusable on Windows
References: <49FF3340.2040008@HIDDEN>	<4A005A64.5050908@HIDDEN>	<E1M6Epf-0003UC-Jj@etlken>	<4A3F1B05.7030105@HIDDEN>	<E1MIhbi-0003zl-1D@etlken>	<4A3F7058.902@HIDDEN>	<E1MIizy-00049S-1j@etlken>	<4A3F81AC.1070404@HIDDEN>	<4A3F8EAC.5010009@HIDDEN> <19008.29091.473126.629092@HIDDEN>
In-Reply-To: <19008.29091.473126.629092@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Nick Roberts wrote:
> What version of Emacs are you using?
>   

Both trunk and EMACS_23_1_RC. The trunk is slightly better, as the 
branch additionally stops responding after some time debugging (around 
the same time that tooltips stop working - which happened before I 
turned on tooltips the first time I tested on trunk so I mistakenly 
thought they didn't work at all).





Acknowledgement sent to Jason Rumney <jasonr@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#3650; Package emacs. Full text available.

Message received at submit@HIDDEN:


Received: (at submit) by emacsbugs.donarmstrong.com; 23 Jun 2009 08:00:12 +0000
From jasonrumney@HIDDEN Tue Jun 23 01:00:12 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-1.2 required=4.0 tests=AWL,HAS_BUG_NUMBER,
	RCVD_IN_SBLXBL,RCVD_IN_SBLXBL_CBL autolearn=ham
	version=3.2.5-bugs.debian.org_2005_01_02
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5N807xq002293
	for <submit@HIDDEN>; Tue, 23 Jun 2009 01:00:08 -0700
Received: from mx10.gnu.org ([199.232.76.166]:37064)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <jasonrumney@HIDDEN>)
	id 1MJ0vG-0003fY-HJ
	for emacs-pretest-bug@HIDDEN; Tue, 23 Jun 2009 04:00:06 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <jasonrumney@HIDDEN>)
	id 1MJ0vF-0003uL-9E
	for emacs-pretest-bug@HIDDEN; Tue, 23 Jun 2009 04:00:06 -0400
Received: from rv-out-0708.google.com ([209.85.198.244]:42213)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <jasonrumney@HIDDEN>)
	id 1MJ0vE-0003u0-Pc
	for emacs-pretest-bug@HIDDEN; Tue, 23 Jun 2009 04:00:05 -0400
Received: by rv-out-0708.google.com with SMTP id k29so326617rvb.6
        for <emacs-pretest-bug@HIDDEN>; Tue, 23 Jun 2009 01:00:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:received:received:sender:message-id:date:from
         :user-agent:mime-version:to:cc:subject:references:in-reply-to
         :content-type:content-transfer-encoding;
        bh=frEb4jJ6zTrPEXPaMrdZECOYNX7tdDpHd5DdWrb+rk0=;
        b=ExB7pDqBxymuMM95FmK6c0nO86+orjk6XNf0Z8G9br6ujk5MhrlSP+l/ir35QlUDrC
         7V3sQDdgrnbWnbZ0JIPVcoejAWPdeMwK477QMcNJiM5BjtNtfk+LxNJEbcv7xETqKDIc
         KsZ1zsPgd2vpU8U4FjlK/FNOk1gJ8rAneWeFM=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject
         :references:in-reply-to:content-type:content-transfer-encoding;
        b=VaeTiNoOZ8/0tdNtLtcbcCnakEfj4MBovMzdevXvYFNt4W++kOQ7v4zoeAN2e0rDXH
         t9hMkLPqqM3LFbMyZtsCt1Pn4vxw+HoCbiPU+Q0TuGaBUfUroNL39NDOy7NOGGcLmynr
         A+ji5m3cfe0SfCOh7euLRTikDAN9m6af0Fqpg=
Received: by 10.140.174.11 with SMTP id w11mr6511104rve.83.1245744003750;
        Tue, 23 Jun 2009 01:00:03 -0700 (PDT)
Received: from ?10.1.1.112? ([61.4.103.130])
        by mx.google.com with ESMTPS id k2sm14461174rvb.2.2009.06.23.01.00.01
        (version=TLSv1/SSLv3 cipher=RC4-MD5);
        Tue, 23 Jun 2009 01:00:03 -0700 (PDT)
Sender: Jason Rumney <jasonrumney@HIDDEN>
Message-ID: <4A408B5F.5090307@HIDDEN>
Date: Tue, 23 Jun 2009 15:59:27 +0800
From: Jason Rumney <jasonr@HIDDEN>
User-Agent: Thunderbird 2.0.0.21 (Windows/20090302)
MIME-Version: 1.0
To: Nick Roberts <nickrob@HIDDEN>
CC: 3650 <at> debbugs.gnu.org,
        emacs-pretest-bug <emacs-pretest-bug@HIDDEN>
Subject: Re: bug#3650: M-x gdb unusable on Windows
References: <49FF3340.2040008@HIDDEN>	<4A005A64.5050908@HIDDEN>	<E1M6Epf-0003UC-Jj@etlken>	<4A3F1B05.7030105@HIDDEN>	<E1MIhbi-0003zl-1D@etlken>	<4A3F7058.902@HIDDEN>	<E1MIizy-00049S-1j@etlken>	<4A3F81AC.1070404@HIDDEN>	<4A3F8EAC.5010009@HIDDEN> <19008.29091.473126.629092@HIDDEN>
In-Reply-To: <19008.29091.473126.629092@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)

Nick Roberts wrote:
> What version of Emacs are you using?
>   

Both trunk and EMACS_23_1_RC. The trunk is slightly better, as the 
branch additionally stops responding after some time debugging (around 
the same time that tooltips stop working - which happened before I 
turned on tooltips the first time I tested on trunk so I mistakenly 
thought they didn't work at all).





Acknowledgement sent to Jason Rumney <jasonr@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#3650; Package emacs. Full text available.

Message received at 3650@HIDDEN:


Received: (at 3650) by emacsbugs.donarmstrong.com; 23 Jun 2009 07:38:40 +0000
From handa@HIDDEN Tue Jun 23 00:38:40 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-3.5 required=4.0 tests=AWL,HAS_BUG_NUMBER,
	SPF_HELO_PASS autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from mx1.aist.go.jp (mx1.aist.go.jp [150.29.246.133])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5N7cZ9j031239
	for <3650@HIDDEN>; Tue, 23 Jun 2009 00:38:37 -0700
Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115])
	by mx1.aist.go.jp  with ESMTP id n5N7cUBQ029207;
	Tue, 23 Jun 2009 16:38:31 +0900 (JST)
	env-from (handa@HIDDEN)
Received: from smtp1.aist.go.jp
	by rqsmtp1.aist.go.jp  with ESMTP id n5N7cUeA005823;
	Tue, 23 Jun 2009 16:38:30 +0900 (JST)
	env-from (handa@HIDDEN)
Received: 
	by smtp1.aist.go.jp  with ESMTP id n5N7cU5A001478;
	Tue, 23 Jun 2009 16:38:30 +0900 (JST)
	env-from (handa@HIDDEN)
Received: from handa by etlken with local (Exim 4.69)
	(envelope-from <handa@HIDDEN>)
	id 1MJ0aM-0006l1-6n; Tue, 23 Jun 2009 16:38:30 +0900
From: Kenichi Handa <handa@HIDDEN>
To: nickrob@HIDDEN (Nick Roberts)
CC: 3650 <at> debbugs.gnu.org, jasonr@HIDDEN
In-reply-to: <19008.29888.625193.823405@HIDDEN>
	(nickrob@HIDDEN)
Subject: Re: bug#3650: M-x gdb unusable on Windows
References: <49FF3340.2040008@HIDDEN>
	<4A005A64.5050908@HIDDEN>
	<E1M6Epf-0003UC-Jj@etlken>
	<4A3F1B05.7030105@HIDDEN>
	<E1MIhbi-0003zl-1D@etlken>
	<4A3F7058.902@HIDDEN>
	<E1MIizy-00049S-1j@etlken>
	<4A3F81AC.1070404@HIDDEN>
	<4A3F8EAC.5010009@HIDDEN>
	<E1MIvIH-0005ow-Mq@etlken> <19008.29888.625193.823405@HIDDEN>
Message-Id: <E1MJ0aM-0006l1-6n@etlken>
Date: Tue, 23 Jun 2009 16:38:30 +0900

In article <19008.29888.625193.823405@HIDDEN>, nickrob@HIDDEN (Nick Roberts) writes:

> It seems that this problem is not specific to Windows.  On
> GNU/Linux, to debug a program compiled using libtool, I have
> to to debug ./.libs/PROGNAME.  In that case, even if the
> current directory has .gdbinit, it is not loaded in the gdb
> session because gdb starts with the directory ./.libs.

> You can change the behaviour to keep the current directory by setting
> gud-chdir-before-run to nil.  The problem with this arrangement is that it
> might not find your .gdbinit file (as with Emacs) and it's generally less
> obvious what the default directory is in Emacs than what the current
> working directory is from the command line.

How about making gud don't change directory when a program
is specified with a relative path if gud-chdir-before-run is
not nil nor t (I can't think of a good symbol at the
moment)?  I usually specify a relative path at M-x gdb when
I'm in a buffer visiting a source file of a program to
debug.  If I'm in a buffer not related to a program to
debug, I usually specify the program by an absolute path.

> but it might be a good idea to document the variable
> gud-chdir-before-run in the manual.

Sure.

---
Kenichi Handa
handa@HIDDEN



Acknowledgement sent to Kenichi Handa <handa@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#3650; Package emacs. Full text available.

Message received at submit@HIDDEN:


Received: (at submit) by emacsbugs.donarmstrong.com; 23 Jun 2009 06:41:47 +0000
From nickrob@HIDDEN Mon Jun 22 23:41:47 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-4.8 required=4.0 tests=AWL,HAS_BUG_NUMBER
	autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5N6fe2I021104
	for <submit@HIDDEN>; Mon, 22 Jun 2009 23:41:42 -0700
Received: from mail.gnu.org ([199.232.76.166]:34830 helo=mx10.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <nickrob@HIDDEN>)
	id 1MIzhM-0001au-Ey
	for emacs-pretest-bug@HIDDEN; Tue, 23 Jun 2009 02:41:40 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <nickrob@HIDDEN>)
	id 1MIzhJ-0001D5-E2
	for emacs-pretest-bug@HIDDEN; Tue, 23 Jun 2009 02:41:40 -0400
Received: from [202.37.101.25] (port=56485 helo=viper.snap.net.nz)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <nickrob@HIDDEN>)
	id 1MIzhI-0001Cj-RI; Tue, 23 Jun 2009 02:41:37 -0400
Received: from totara (110.28.255.123.dynamic.snap.net.nz [123.255.28.110])
	by viper.snap.net.nz (Postfix) with ESMTP id B228D3DA05E;
	Tue, 23 Jun 2009 18:22:57 +1200 (NZST)
Received: by totara (Postfix, from userid 1000)
	id A426FC13F; Tue, 23 Jun 2009 18:22:56 +1200 (NZST)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <19008.29888.625193.823405@HIDDEN>
Date: Tue, 23 Jun 2009 18:22:56 +1200
To: Kenichi Handa <handa@HIDDEN>, 3650 <at> debbugs.gnu.org
Cc: Jason Rumney <jasonr@HIDDEN>, emacs-pretest-bug@HIDDEN
Subject: bug#3650: M-x gdb unusable on Windows
In-Reply-To: <E1MIvIH-0005ow-Mq@etlken>
References: <49FF3340.2040008@HIDDEN>
	<4A005A64.5050908@HIDDEN>
	<E1M6Epf-0003UC-Jj@etlken>
	<4A3F1B05.7030105@HIDDEN>
	<E1MIhbi-0003zl-1D@etlken>
	<4A3F7058.902@HIDDEN>
	<E1MIizy-00049S-1j@etlken>
	<4A3F81AC.1070404@HIDDEN>
	<4A3F8EAC.5010009@HIDDEN>
	<E1MIvIH-0005ow-Mq@etlken>
X-Mailer: VM 7.19 under Emacs 22.2.1
From: nickrob@HIDDEN (Nick Roberts)
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6
X-Greylist: delayed 1905 seconds by postgrey-1.27 at monty-python; Tue, 23 Jun 2009 02:41:36 EDT
X-Greylist: delayed 1896 seconds by postgrey-1.27 at monty-python; Tue, 23 Jun 2009 02:41:36 EDT

Kenichi Handa writes:
 > In article <4A3F8EAC.5010009@HIDDEN>, Jason Rumney <jasonr@HIDDEN> writes:
 > 
 > > Problem 1 is that the default directory of gdb is the directory where 
 > > the Emacs executable is even though I started it from the source 
 > > directory and specified oo/i386/emacs.exe as the executable to debug. 
 > > This means that .gdbinit needs to be "source"d in manually.
 > 
 > It seems that this problem is not specific to Windows.  On
 > GNU/Linux, to debug a program compiled using libtool, I have
 > to to debug ./.libs/PROGNAME.  In that case, even if the
 > current directory has .gdbinit, it is not loaded in the gdb
 > session because gdb starts with the directory ./.libs.

You can change the behaviour to keep the current directory by setting
gud-chdir-before-run to nil.  The problem with this arrangement is that it
might not find your .gdbinit file (as with Emacs) and it's generally less
obvious what the default directory is in Emacs than what the current
working directory is from the command line.

Dan might find it "extremely annoying" but this change goes back to
2001-05-24 when gud.el was in the lisp directory.

I quite like this default and suggest keeping it, but it might be a good
idea to document the variable gud-chdir-before-run in the manual.

-- 
Nick                                           http://www.inet.net.nz/~nickrob



Acknowledgement sent to nickrob@HIDDEN (Nick Roberts):
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#3650; Package emacs. Full text available.

Message received at submit@HIDDEN:


Received: (at submit) by emacsbugs.donarmstrong.com; 23 Jun 2009 06:41:46 +0000
From nickrob@HIDDEN Mon Jun 22 23:41:46 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-4.7 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER
	autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5N6fe5C021103
	for <submit@HIDDEN>; Mon, 22 Jun 2009 23:41:41 -0700
Received: from mx10.gnu.org ([199.232.76.166]:34829)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <nickrob@HIDDEN>)
	id 1MIzhL-0001ar-II
	for emacs-pretest-bug@HIDDEN; Tue, 23 Jun 2009 02:41:39 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <nickrob@HIDDEN>)
	id 1MIzhJ-0001DA-Er
	for emacs-pretest-bug@HIDDEN; Tue, 23 Jun 2009 02:41:39 -0400
Received: from [202.37.101.25] (port=56486 helo=viper.snap.net.nz)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <nickrob@HIDDEN>)
	id 1MIzhI-0001Cl-RQ; Tue, 23 Jun 2009 02:41:37 -0400
Received: from totara (110.28.255.123.dynamic.snap.net.nz [123.255.28.110])
	by viper.snap.net.nz (Postfix) with ESMTP id 5D69C3D9FEB;
	Tue, 23 Jun 2009 18:09:40 +1200 (NZST)
Received: by totara (Postfix, from userid 1000)
	id 791CBC13F; Tue, 23 Jun 2009 18:09:39 +1200 (NZST)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <19008.29091.473126.629092@HIDDEN>
Date: Tue, 23 Jun 2009 18:09:39 +1200
To: Jason Rumney <jasonr@HIDDEN>, 3650 <at> debbugs.gnu.org
Cc: emacs-pretest-bug <emacs-pretest-bug@HIDDEN>
Subject: bug#3650: M-x gdb unusable on Windows
In-Reply-To: <4A3F8EAC.5010009@HIDDEN>
References: <49FF3340.2040008@HIDDEN>
	<4A005A64.5050908@HIDDEN>
	<E1M6Epf-0003UC-Jj@etlken>
	<4A3F1B05.7030105@HIDDEN>
	<E1MIhbi-0003zl-1D@etlken>
	<4A3F7058.902@HIDDEN>
	<E1MIizy-00049S-1j@etlken>
	<4A3F81AC.1070404@HIDDEN>
	<4A3F8EAC.5010009@HIDDEN>
X-Mailer: VM 7.19 under Emacs 22.2.1
From: nickrob@HIDDEN (Nick Roberts)
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6

Jason Rumney writes:
 > Jason Rumney wrote:
 > > Kenichi Handa wrote:
 > >
 > >> By the way, I also installed gdb-6.8-mingw-3.tar.bz2.  But,
 > >> with "M-x gdb", pp and pr commands doesn't work.  They print
 > >> nothing.  They do work when gdb is invoked from command
 > >> line.  Do you know what is wrong?

Are you sure they print nothing or is it just that the output isn't
being flushed?  The commentary in gdb-ui.el has some advice about using
Emacs and GDB on Windows:

  ;; If you are using Emacs and GDB on Windows you will need to flush the buffer
  ;; explicitly in your program if you want timely display of I/O in Emacs.
  ;; Alternatively you can make the output stream unbuffered, for example, by
  ;; using a macro:

  ;;           #ifdef UNBUFFERED
  ;;	     setvbuf (stdout, (char *) NULL, _IONBF, 0);
  ;;	     #endif

  ;; and compiling with -DUNBUFFERED while debugging.

 > > I've often had problems in the past using debuggers under Emacs on 
 > > Windows (under Emacs 21 and early 22 development versions though, so I 
 > > haven't tried the new gdb-ui extensively), so I always use the command 
 > > line.
 > 
 > I just tried it, and it seems to be even worse than I remembered.

Perhaps you mean:

  I just tried it, and I can't get it to work.

Asking on this list if others are successfully using it will probably answer
the question as to whether the problem is at your end or not.  Saying it
is unusable is a bit cheap.

 > Problem 1 is that ...

What version of Emacs are you using?

-- 
Nick                                           http://www.inet.net.nz/~nickrob



Acknowledgement sent to nickrob@HIDDEN (Nick Roberts):
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#3650; Package emacs. Full text available.

Message received at 3650@HIDDEN:


Received: (at 3650) by emacsbugs.donarmstrong.com; 23 Jun 2009 06:23:03 +0000
From nickrob@HIDDEN Mon Jun 22 23:23:02 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-4.8 required=4.0 tests=AWL,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from viper.snap.net.nz (viper.snap.net.nz [202.37.101.25] (may be forged))
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5N6Mw79017854
	for <3650@HIDDEN>; Mon, 22 Jun 2009 23:22:59 -0700
Received: from totara (110.28.255.123.dynamic.snap.net.nz [123.255.28.110])
	by viper.snap.net.nz (Postfix) with ESMTP id B228D3DA05E;
	Tue, 23 Jun 2009 18:22:57 +1200 (NZST)
Received: by totara (Postfix, from userid 1000)
	id A426FC13F; Tue, 23 Jun 2009 18:22:56 +1200 (NZST)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <19008.29888.625193.823405@HIDDEN>
Date: Tue, 23 Jun 2009 18:22:56 +1200
To: Kenichi Handa <handa@HIDDEN>, 3650 <at> debbugs.gnu.org
Cc: Jason Rumney <jasonr@HIDDEN>, emacs-pretest-bug@HIDDEN
Subject: bug#3650: M-x gdb unusable on Windows
In-Reply-To: <E1MIvIH-0005ow-Mq@etlken>
References: <49FF3340.2040008@HIDDEN>
	<4A005A64.5050908@HIDDEN>
	<E1M6Epf-0003UC-Jj@etlken>
	<4A3F1B05.7030105@HIDDEN>
	<E1MIhbi-0003zl-1D@etlken>
	<4A3F7058.902@HIDDEN>
	<E1MIizy-00049S-1j@etlken>
	<4A3F81AC.1070404@HIDDEN>
	<4A3F8EAC.5010009@HIDDEN>
	<E1MIvIH-0005ow-Mq@etlken>
X-Mailer: VM 7.19 under Emacs 22.2.1
From: nickrob@HIDDEN (Nick Roberts)

Kenichi Handa writes:
 > In article <4A3F8EAC.5010009@HIDDEN>, Jason Rumney <jasonr@HIDDEN> writes:
 > 
 > > Problem 1 is that the default directory of gdb is the directory where 
 > > the Emacs executable is even though I started it from the source 
 > > directory and specified oo/i386/emacs.exe as the executable to debug. 
 > > This means that .gdbinit needs to be "source"d in manually.
 > 
 > It seems that this problem is not specific to Windows.  On
 > GNU/Linux, to debug a program compiled using libtool, I have
 > to to debug ./.libs/PROGNAME.  In that case, even if the
 > current directory has .gdbinit, it is not loaded in the gdb
 > session because gdb starts with the directory ./.libs.

You can change the behaviour to keep the current directory by setting
gud-chdir-before-run to nil.  The problem with this arrangement is that it
might not find your .gdbinit file (as with Emacs) and it's generally less
obvious what the default directory is in Emacs than what the current
working directory is from the command line.

Dan might find it "extremely annoying" but this change goes back to
2001-05-24 when gud.el was in the lisp directory.

I quite like this default and suggest keeping it, but it might be a good
idea to document the variable gud-chdir-before-run in the manual.

-- 
Nick                                           http://www.inet.net.nz/~nickrob



Acknowledgement sent to nickrob@HIDDEN (Nick Roberts):
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#3650; Package emacs. Full text available.

Message received at 3650@HIDDEN:


Received: (at 3650) by emacsbugs.donarmstrong.com; 23 Jun 2009 06:09:50 +0000
From nickrob@HIDDEN Mon Jun 22 23:09:50 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-4.8 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from viper.snap.net.nz (viper.snap.net.nz [202.37.101.25] (may be forged))
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5N69iUE015263
	for <3650@HIDDEN>; Mon, 22 Jun 2009 23:09:45 -0700
Received: from totara (110.28.255.123.dynamic.snap.net.nz [123.255.28.110])
	by viper.snap.net.nz (Postfix) with ESMTP id 5D69C3D9FEB;
	Tue, 23 Jun 2009 18:09:40 +1200 (NZST)
Received: by totara (Postfix, from userid 1000)
	id 791CBC13F; Tue, 23 Jun 2009 18:09:39 +1200 (NZST)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <19008.29091.473126.629092@HIDDEN>
Date: Tue, 23 Jun 2009 18:09:39 +1200
To: Jason Rumney <jasonr@HIDDEN>, 3650 <at> debbugs.gnu.org
Cc: emacs-pretest-bug <emacs-pretest-bug@HIDDEN>
Subject: bug#3650: M-x gdb unusable on Windows
In-Reply-To: <4A3F8EAC.5010009@HIDDEN>
References: <49FF3340.2040008@HIDDEN>
	<4A005A64.5050908@HIDDEN>
	<E1M6Epf-0003UC-Jj@etlken>
	<4A3F1B05.7030105@HIDDEN>
	<E1MIhbi-0003zl-1D@etlken>
	<4A3F7058.902@HIDDEN>
	<E1MIizy-00049S-1j@etlken>
	<4A3F81AC.1070404@HIDDEN>
	<4A3F8EAC.5010009@HIDDEN>
X-Mailer: VM 7.19 under Emacs 22.2.1
From: nickrob@HIDDEN (Nick Roberts)

Jason Rumney writes:
 > Jason Rumney wrote:
 > > Kenichi Handa wrote:
 > >
 > >> By the way, I also installed gdb-6.8-mingw-3.tar.bz2.  But,
 > >> with "M-x gdb", pp and pr commands doesn't work.  They print
 > >> nothing.  They do work when gdb is invoked from command
 > >> line.  Do you know what is wrong?

Are you sure they print nothing or is it just that the output isn't
being flushed?  The commentary in gdb-ui.el has some advice about using
Emacs and GDB on Windows:

  ;; If you are using Emacs and GDB on Windows you will need to flush the buffer
  ;; explicitly in your program if you want timely display of I/O in Emacs.
  ;; Alternatively you can make the output stream unbuffered, for example, by
  ;; using a macro:

  ;;           #ifdef UNBUFFERED
  ;;	     setvbuf (stdout, (char *) NULL, _IONBF, 0);
  ;;	     #endif

  ;; and compiling with -DUNBUFFERED while debugging.

 > > I've often had problems in the past using debuggers under Emacs on 
 > > Windows (under Emacs 21 and early 22 development versions though, so I 
 > > haven't tried the new gdb-ui extensively), so I always use the command 
 > > line.
 > 
 > I just tried it, and it seems to be even worse than I remembered.

Perhaps you mean:

  I just tried it, and I can't get it to work.

Asking on this list if others are successfully using it will probably answer
the question as to whether the problem is at your end or not.  Saying it
is unusable is a bit cheap.

 > Problem 1 is that ...

What version of Emacs are you using?

-- 
Nick                                           http://www.inet.net.nz/~nickrob



Acknowledgement sent to nickrob@HIDDEN (Nick Roberts):
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#3650; Package emacs. Full text available.

Message received at 3650@HIDDEN:


Received: (at 3650) by emacsbugs.donarmstrong.com; 23 Jun 2009 03:37:43 +0000
From dann@HIDDEN Mon Jun 22 20:37:43 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-7.1 required=4.0 tests=AWL,HAS_BUG_NUMBER,
	X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from barrelv2.ics.uci.edu (barrelv2.ics.uci.edu [128.195.1.114])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5N3bdFo020732
	for <3650@HIDDEN>; Mon, 22 Jun 2009 20:37:40 -0700
Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101])
	by barrelv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n5N3bRiG017420;
	Mon, 22 Jun 2009 20:37:27 -0700 (PDT)
Received: (from dann@localhost)
	by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n5N3bQGh016672;
	Mon, 22 Jun 2009 20:37:26 -0700 (PDT)
Date: Mon, 22 Jun 2009 20:37:26 -0700 (PDT)
Message-Id: <200906230337.n5N3bQGh016672@HIDDEN>
From: Dan Nicolaescu <dann@HIDDEN>
To: Kenichi Handa <handa@HIDDEN>
Cc: 3650 <at> debbugs.gnu.org, Jason Rumney <jasonr@HIDDEN>
Subject: Re: bug#3650: M-x gdb unusable on Windows
References: <49FF3340.2040008@HIDDEN> <4A005A64.5050908@HIDDEN>
	<E1M6Epf-0003UC-Jj@etlken> <4A3F1B05.7030105@HIDDEN>
	<E1MIhbi-0003zl-1D@etlken> <4A3F7058.902@HIDDEN>
	<E1MIizy-00049S-1j@etlken> <4A3F81AC.1070404@HIDDEN>
	<4A3F8EAC.5010009@HIDDEN> <E1MIvIH-0005ow-Mq@etlken>
X-Debbugs-No-Ack: yes
In-Reply-To: <E1MIvIH-0005ow-Mq@etlken> (Kenichi Handa's message of "Tue, 23
	Jun 2009 10:59:29 +0900")
Lines: 42
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-ICS-MailScanner-Information: Please contact the ISP for more information
X-ICS-MailScanner-ID: n5N3bRiG017420
X-ICS-MailScanner: Found to be clean
X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5,
	autolearn=disabled, ALL_TRUSTED -1.44)
X-ICS-MailScanner-From: dann@HIDDEN

Kenichi Handa <handa@HIDDEN> writes:

  > In article <4A3F8EAC.5010009@HIDDEN>, Jason Rumney <jasonr@HIDDEN> writes:
  > 
  > > Problem 1 is that the default directory of gdb is the directory where 
  > > the Emacs executable is even though I started it from the source 
  > > directory and specified oo/i386/emacs.exe as the executable to debug. 
  > > This means that .gdbinit needs to be "source"d in manually.
  > 
  > It seems that this problem is not specific to Windows.  On
  > GNU/Linux, to debug a program compiled using libtool, I have
  > to to debug ./.libs/PROGNAME.  In that case, even if the
  > current directory has .gdbinit, it is not loaded in the gdb
  > session because gdb starts with the directory ./.libs.

This is extremely annoying, I've had to add 
(setq gud-chdir-before-run nil) 
to my .emacs at some point to get around this.

The current default completely breaks if you want to debug things that
use relative file names.  Say if you have:

subdir1/binary -blah subdir2/foo -bar subdir3/baz

That you can debug from the command like simply doing:

gdb --args subdir1/binary -blah subdir2/foo -bar subdir3/baz

you can't debug this by default by doing:

M-x gdb RET --args subdir1/binary -blah subdir2/foo -bar subdir3/baz

like one could do with emacs-21... 

Things work much better if you  set 
   (setq gud-chdir-before-run nil)

Not sure what's the point of this change, making M-x gdb different from
doing the same thing from the command line by default does not sound
like a great idea.





Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#3650; Package emacs. Full text available.

Message received at 3650@HIDDEN:


Received: (at 3650) by emacsbugs.donarmstrong.com; 23 Jun 2009 01:59:38 +0000
From handa@HIDDEN Mon Jun 22 18:59:37 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-3.0 required=4.0 tests=AWL,HAS_BUG_NUMBER,
	IMPRONONCABLE_2,SPF_HELO_PASS autolearn=ham
	version=3.2.5-bugs.debian.org_2005_01_02
Received: from mx1.aist.go.jp (mx1.aist.go.jp [150.29.246.133])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5N1xWnh003097
	for <3650@HIDDEN>; Mon, 22 Jun 2009 18:59:33 -0700
Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115])
	by mx1.aist.go.jp  with ESMTP id n5N1xUvg020413;
	Tue, 23 Jun 2009 10:59:30 +0900 (JST)
	env-from (handa@HIDDEN)
Received: from smtp3.aist.go.jp
	by rqsmtp1.aist.go.jp  with ESMTP id n5N1xUSu004054;
	Tue, 23 Jun 2009 10:59:30 +0900 (JST)
	env-from (handa@HIDDEN)
Received: 
	by smtp3.aist.go.jp  with ESMTP id n5N1xTjO012657;
	Tue, 23 Jun 2009 10:59:29 +0900 (JST)
	env-from (handa@HIDDEN)
Received: from handa by etlken with local (Exim 4.69)
	(envelope-from <handa@HIDDEN>)
	id 1MIvIH-0005ow-Mq; Tue, 23 Jun 2009 10:59:29 +0900
From: Kenichi Handa <handa@HIDDEN>
To: Jason Rumney <jasonr@HIDDEN>, 3650 <at> debbugs.gnu.org
CC: emacs-pretest-bug@HIDDEN
In-reply-to: <4A3F8EAC.5010009@HIDDEN> (message from Jason Rumney on Mon, 22
	Jun 2009 22:01:16 +0800)
Subject: Re: bug#3650: M-x gdb unusable on Windows
References: <49FF3340.2040008@HIDDEN>
	<4A005A64.5050908@HIDDEN>	<E1M6Epf-0003UC-Jj@etlken>
	<4A3F1B05.7030105@HIDDEN>	<E1MIhbi-0003zl-1D@etlken>
	<4A3F7058.902@HIDDEN>	<E1MIizy-00049S-1j@etlken>
	<4A3F81AC.1070404@HIDDEN> <4A3F8EAC.5010009@HIDDEN>
Message-Id: <E1MIvIH-0005ow-Mq@etlken>
Date: Tue, 23 Jun 2009 10:59:29 +0900

In article <4A3F8EAC.5010009@HIDDEN>, Jason Rumney <jasonr@HIDDEN> writes:

> Problem 1 is that the default directory of gdb is the directory where 
> the Emacs executable is even though I started it from the source 
> directory and specified oo/i386/emacs.exe as the executable to debug. 
> This means that .gdbinit needs to be "source"d in manually.

It seems that this problem is not specific to Windows.  On
GNU/Linux, to debug a program compiled using libtool, I have
to to debug ./.libs/PROGNAME.  In that case, even if the
current directory has .gdbinit, it is not loaded in the gdb
session because gdb starts with the directory ./.libs.

> In addition, 
> gud is unable to find source files that are not already being visited:

>     (gdb) break fontset_find_font
>     Breakpoint 1 at 0x10f9dd7: file fontset.c, line 527.
>     (gdb) list :1
>     No source file named  in loaded symbols.

This doesn't happen to me.  I don't know why.  I built emacs
by manually deleting "-o2" from src/makefile after running
nt/configure.bat.  Does it change the situation?!?

> Problem 2 is that Emacs output (including the results of pp and pr) is 
> redirected to a buffer entitled *input/output of emacs.exe*, or at least 
> that is what the intention appears to be.  That buffer is populated as 
> follows when gdb starts, and never updates:

In my M-x gdb session, that buffer is not created!?!

>     c:\GnuWin32\bin\sleep.exe: cannot read realtime clock: Invalid argument
   
>     Process gdb-inferior exited abnormally with code 1

> Problem 3 is that there appears to be a menu toggle for disabling this 
> output redirection, but it does not function. Instead, I see this in 
> *Messages*:

>     Symbol's function definition is void: gdb-use-separate-io-buffer

Menu->Gud->GDB-UI->Separate IO doesn't cause that error.
Actually gdb-use-separate-io-buffer is a variable defined in
gdb-mi.el.

> Problem 4 is that enabling GUD tooltips results messages like the following:

>     error in process filter: Args out of range: "", 0, -1 [2 times]


M-x gud-tooltip-mode RET doesn't cause that problem.

> Problem 5 is the general slowness. This one is probably down to Windows 
> poor subprocess and pipe support, but the rest seem to be real problems 
> within gud/gdb-mi.

It seems that my environment is different from yours.

---
Kenichi Handa
handa@HIDDEN



Acknowledgement sent to Kenichi Handa <handa@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#3650; Package emacs. Full text available.

Message received at submit@HIDDEN:


Received: (at submit) by emacsbugs.donarmstrong.com; 23 Jun 2009 01:59:52 +0000
From handa@HIDDEN Mon Jun 22 18:59:52 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-3.0 required=4.0 tests=AWL,HAS_BUG_NUMBER,
	IMPRONONCABLE_2 autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5N1xmwj003113
	for <submit@HIDDEN>; Mon, 22 Jun 2009 18:59:49 -0700
Received: from mx10.gnu.org ([199.232.76.166]:45534)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <handa@HIDDEN>)
	id 1MIvIZ-0002nE-Hr
	for emacs-pretest-bug@HIDDEN; Mon, 22 Jun 2009 21:59:47 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <handa@HIDDEN>)
	id 1MIvIY-0005s0-Ml
	for emacs-pretest-bug@HIDDEN; Mon, 22 Jun 2009 21:59:47 -0400
Received: from mx1.aist.go.jp ([150.29.246.133]:39050)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <handa@HIDDEN>)
	id 1MIvIU-0005qV-Qq; Mon, 22 Jun 2009 21:59:43 -0400
Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115])
	by mx1.aist.go.jp  with ESMTP id n5N1xUvg020413;
	Tue, 23 Jun 2009 10:59:30 +0900 (JST)
	env-from (handa@HIDDEN)
Received: from smtp3.aist.go.jp
	by rqsmtp1.aist.go.jp  with ESMTP id n5N1xUSu004054;
	Tue, 23 Jun 2009 10:59:30 +0900 (JST)
	env-from (handa@HIDDEN)
Received: 
	by smtp3.aist.go.jp  with ESMTP id n5N1xTjO012657;
	Tue, 23 Jun 2009 10:59:29 +0900 (JST)
	env-from (handa@HIDDEN)
Received: from handa by etlken with local (Exim 4.69)
	(envelope-from <handa@HIDDEN>)
	id 1MIvIH-0005ow-Mq; Tue, 23 Jun 2009 10:59:29 +0900
From: Kenichi Handa <handa@HIDDEN>
To: Jason Rumney <jasonr@HIDDEN>, 3650 <at> debbugs.gnu.org
CC: emacs-pretest-bug@HIDDEN
In-reply-to: <4A3F8EAC.5010009@HIDDEN> (message from Jason Rumney on Mon, 22
	Jun 2009 22:01:16 +0800)
Subject: Re: bug#3650: M-x gdb unusable on Windows
References: <49FF3340.2040008@HIDDEN>
	<4A005A64.5050908@HIDDEN>	<E1M6Epf-0003UC-Jj@etlken>
	<4A3F1B05.7030105@HIDDEN>	<E1MIhbi-0003zl-1D@etlken>
	<4A3F7058.902@HIDDEN>	<E1MIizy-00049S-1j@etlken>
	<4A3F81AC.1070404@HIDDEN> <4A3F8EAC.5010009@HIDDEN>
Message-Id: <E1MIvIH-0005ow-Mq@etlken>
Date: Tue, 23 Jun 2009 10:59:29 +0900
X-detected-operating-system: by monty-python.gnu.org: Solaris 9

In article <4A3F8EAC.5010009@HIDDEN>, Jason Rumney <jasonr@HIDDEN> writes:

> Problem 1 is that the default directory of gdb is the directory where 
> the Emacs executable is even though I started it from the source 
> directory and specified oo/i386/emacs.exe as the executable to debug. 
> This means that .gdbinit needs to be "source"d in manually.

It seems that this problem is not specific to Windows.  On
GNU/Linux, to debug a program compiled using libtool, I have
to to debug ./.libs/PROGNAME.  In that case, even if the
current directory has .gdbinit, it is not loaded in the gdb
session because gdb starts with the directory ./.libs.

> In addition, 
> gud is unable to find source files that are not already being visited:

>     (gdb) break fontset_find_font
>     Breakpoint 1 at 0x10f9dd7: file fontset.c, line 527.
>     (gdb) list :1
>     No source file named  in loaded symbols.

This doesn't happen to me.  I don't know why.  I built emacs
by manually deleting "-o2" from src/makefile after running
nt/configure.bat.  Does it change the situation?!?

> Problem 2 is that Emacs output (including the results of pp and pr) is 
> redirected to a buffer entitled *input/output of emacs.exe*, or at least 
> that is what the intention appears to be.  That buffer is populated as 
> follows when gdb starts, and never updates:

In my M-x gdb session, that buffer is not created!?!

>     c:\GnuWin32\bin\sleep.exe: cannot read realtime clock: Invalid argument
   
>     Process gdb-inferior exited abnormally with code 1

> Problem 3 is that there appears to be a menu toggle for disabling this 
> output redirection, but it does not function. Instead, I see this in 
> *Messages*:

>     Symbol's function definition is void: gdb-use-separate-io-buffer

Menu->Gud->GDB-UI->Separate IO doesn't cause that error.
Actually gdb-use-separate-io-buffer is a variable defined in
gdb-mi.el.

> Problem 4 is that enabling GUD tooltips results messages like the following:

>     error in process filter: Args out of range: "", 0, -1 [2 times]


M-x gud-tooltip-mode RET doesn't cause that problem.

> Problem 5 is the general slowness. This one is probably down to Windows 
> poor subprocess and pipe support, but the rest seem to be real problems 
> within gud/gdb-mi.

It seems that my environment is different from yours.

---
Kenichi Handa
handa@HIDDEN



Acknowledgement sent to Kenichi Handa <handa@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#3650; Package emacs. Full text available.

Message received at submit@HIDDEN:


Received: (at submit) by emacsbugs.donarmstrong.com; 22 Jun 2009 14:02:02 +0000
From jasonrumney@HIDDEN Mon Jun 22 07:02:02 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-1.3 required=4.0 tests=AWL,IMPRONONCABLE_2
	autolearn=no version=3.2.5-bugs.debian.org_2005_01_02
Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5ME1vEk004611
	for <submit@HIDDEN>; Mon, 22 Jun 2009 07:01:58 -0700
Received: from mx10.gnu.org ([199.232.76.166]:47944)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <jasonrumney@HIDDEN>)
	id 1MIk5s-00038n-Ty
	for emacs-pretest-bug@HIDDEN; Mon, 22 Jun 2009 10:01:57 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <jasonrumney@HIDDEN>)
	id 1MIk5s-0002mC-1S
	for emacs-pretest-bug@HIDDEN; Mon, 22 Jun 2009 10:01:56 -0400
Received: from mail-px0-f176.google.com ([209.85.216.176]:57980)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <jasonrumney@HIDDEN>)
	id 1MIk5r-0002lr-KP
	for emacs-pretest-bug@HIDDEN; Mon, 22 Jun 2009 10:01:55 -0400
Received: by pxi6 with SMTP id 6so3632488pxi.14
        for <emacs-pretest-bug@HIDDEN>; Mon, 22 Jun 2009 07:01:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:received:received:sender:message-id:date:from
         :user-agent:mime-version:to:subject:references:in-reply-to
         :content-type:content-transfer-encoding;
        bh=d9+h7dAxQ7ohFJGcg/I/FuuSgiYYZiqBIfduUsLNdx4=;
        b=r3Smx//RiDvO+WwzD3tb8+XmpreJfoSx/jbm4OcbHbP2qUAmoiKboMjHukmPvMbohX
         w5AXokiX4wedzhBUhi/cPR//Nh3X6LkWrvh9asG2A//K0/RVNDqs/zklw+X2iWrVX67A
         Z/I/utNK8QagokLamKWpT9mX3KlTvmbDj1PAc=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=sender:message-id:date:from:user-agent:mime-version:to:subject
         :references:in-reply-to:content-type:content-transfer-encoding;
        b=P18iGXYjHz1zafMs2bQ9PTULbK+T6Y+RYZw7Xjb32knrgsYbab/4ZDwCcZlwcAK4gk
         EfpMMiymLkzYtbfVPjBX6MzS9ZJQnDEPnw3XzleDORGBMvZ35P1Qe0qw9o08WWGx6gIS
         FS5RZJPcCNmUbZemnLe63BIQefthnJGvW6Jgw=
Received: by 10.142.113.17 with SMTP id l17mr2751849wfc.299.1245679311039;
        Mon, 22 Jun 2009 07:01:51 -0700 (PDT)
Received: from ?192.168.249.26? ([124.13.3.16])
        by mx.google.com with ESMTPS id 22sm841030wfg.27.2009.06.22.07.01.49
        (version=TLSv1/SSLv3 cipher=RC4-MD5);
        Mon, 22 Jun 2009 07:01:50 -0700 (PDT)
Sender: Jason Rumney <jasonrumney@HIDDEN>
Message-ID: <4A3F8EAC.5010009@HIDDEN>
Date: Mon, 22 Jun 2009 22:01:16 +0800
From: Jason Rumney <jasonr@HIDDEN>
User-Agent: Thunderbird 2.0.0.21 (Windows/20090302)
MIME-Version: 1.0
To: emacs-pretest-bug <emacs-pretest-bug@HIDDEN>
Subject: M-x gdb unusable on Windows
References: <49FF3340.2040008@HIDDEN> <4A005A64.5050908@HIDDEN>	<E1M6Epf-0003UC-Jj@etlken> <4A3F1B05.7030105@HIDDEN>	<E1MIhbi-0003zl-1D@etlken> <4A3F7058.902@HIDDEN>	<E1MIizy-00049S-1j@etlken> <4A3F81AC.1070404@HIDDEN>
In-Reply-To: <4A3F81AC.1070404@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)

Jason Rumney wrote:
> Kenichi Handa wrote:
>
>> By the way, I also installed gdb-6.8-mingw-3.tar.bz2.  But,
>> with "M-x gdb", pp and pr commands doesn't work.  They print
>> nothing.  They do work when gdb is invoked from command
>> line.  Do you know what is wrong?
>>   
>
> I've often had problems in the past using debuggers under Emacs on 
> Windows (under Emacs 21 and early 22 development versions though, so I 
> haven't tried the new gdb-ui extensively), so I always use the command 
> line.

I just tried it, and it seems to be even worse than I remembered.

Problem 1 is that the default directory of gdb is the directory where 
the Emacs executable is even though I started it from the source 
directory and specified oo/i386/emacs.exe as the executable to debug. 
This means that .gdbinit needs to be "source"d in manually. In addition, 
gud is unable to find source files that are not already being visited:

    (gdb) break fontset_find_font
    Breakpoint 1 at 0x10f9dd7: file fontset.c, line 527.
    (gdb) list :1
    No source file named  in loaded symbols.


Problem 2 is that Emacs output (including the results of pp and pr) is 
redirected to a buffer entitled *input/output of emacs.exe*, or at least 
that is what the intention appears to be.  That buffer is populated as 
follows when gdb starts, and never updates:

    c:\GnuWin32\bin\sleep.exe: cannot read realtime clock: Invalid argument
   
    Process gdb-inferior exited abnormally with code 1

Problem 3 is that there appears to be a menu toggle for disabling this 
output redirection, but it does not function. Instead, I see this in 
*Messages*:

    Symbol's function definition is void: gdb-use-separate-io-buffer


Problem 4 is that enabling GUD tooltips results messages like the following:

    error in process filter: Args out of range: "", 0, -1 [2 times]


Problem 5 is the general slowness. This one is probably down to Windows 
poor subprocess and pipe support, but the rest seem to be real problems 
within gud/gdb-mi.




Acknowledgement sent to Jason Rumney <jasonr@HIDDEN>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Report forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#3650; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.