Re: GDB hang on "run"

Uri Moszkowicz <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CAMJd5ATF4uZvsmh-mSdGrRv8DjhNUOe0DJqua5uYSXDpXuTv6g@mail.gmail.com>
Thanks for the tips. I was also noticing a hang exiting shells so I played
around a little bit and discovered that it's due to a Redhat6 NFS bug
around locking my .history file. I removed the file and the problem went
away.

On Wed, Aug 8, 2018 at 10:37 AM Tom Tromey <[email protected]> wrote:

> >>>>> "Uri" == Uri Moszkowicz <[email protected]> writes:
>
> Uri> Lately gdb has been hanging for me when running my executable. I'm
> using
> Uri> GDB 8.1 but it occurs with older versions as well. Here's what I see:
>
> Uri> (gdb) source run.gdb
> Uri> Temporary breakpoint 1 at 0xbaf645: file <path>/<file>.cc, line 3501.
> Uri> ^CTraceback (most recent call last):
> Uri>   File "/<path>/gcc-6.2.0/redhat6/lib64/libstdc++.so.6.0.22-gdb.py",
> line
> Uri> 18, in <module>
> Uri>     import gdb
> Uri> ImportError: No module named gdb
>
> Uri> What I see is a hang right before the Traceback message, that's only
> Uri> bypassed by sending a SIGINT. Anyone know why this might be and what
> I can
> Uri> do to avoid it? Or tips on how to debug this problem?
>
> If your program uses a very large shared library, gdb might be reading
> debug info for it.  Sometimes this can take a while and by default it
> isn't announced.
>
> Otherwise all I can suggest is attaching to gdb with another gdb,
> interrupting it, and see what is going on.
>
> If you suspect it is the "run" command itself, sometimes infrun logging
> is interesting.  That is "set debug infrun 1".
>
> Tom
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.