This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdb hanging in emacs

On 29/04/2012 6:19 PM, Christopher Faylor wrote:
On Sun, Apr 29, 2012 at 08:53:24AM -0400, Ken Brown wrote:
On 4/28/2012 3:58 PM, Ryan Johnson wrote:
Hi all,

I'm trying to use a home-built cross-gdb to do some remote debugging
over tcp, but running gdb inside emacs doesn't work. M-x gud-gdb works
fine, it's something wrong with the emacs integration. Unlike past times
this has come up, the issue doesn't seem to be related to seg faults;
the closest match I can find is from the emacs mailing list a while back
[1], and involves a so-called "phase error." Basically, a large fraction
of commands cause gud to hang in "[initializing...]" state for minutes
or longer, apparently because it doesn't see what it expects and gets

The workaround to use 'file $BINARY' instead of specifying it at the
command line avoids one problem, but simple things like 'set remotebaud
115200' also hang (unless added to a .gdbinit), and actually attempting
to attach to the remote process similarly hangs forever in the
initializing state. There is no CPU or disk utilization, and the command
can't be interrupted with C-c C-c (though that does make it report a
phase error before going back to hung). In some cases the "hang"
resolves itself after about two minutes -- usually for simple commands
like `set remotebaud' -- but more often than not, it's permanent. The
behavior is also somewhat erratic, in the sense that the specific set of
commands that hangs changes slowly over time and/or between invocations.

So, two questions:

1. Has anyone else seen this, and if so, do they have any advice or

2. Cygwin's official gdb doesn't seem to have any of these problems,
though I can't test most of the commands, since it can't attach to the
remote process. Is there some set of cygwin-specific patches I could
borrow that make all the difference, or is my observation just coincidence?
Can't you just download the source for Cygwin's gdb and use that as the
starting point for your home-built cross-gdb?
There is nothing magical in the Cygwin gdb source.  Any recent gdb source
should be perfectly usable.
OK, I was just hoping there was some easy fix.


-- Problem reports: FAQ: Documentation: Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]