bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pthreads + execv causes gdb to get confused


From: Tauno Voipio
Subject: Re: pthreads + execv causes gdb to get confused
Date: Mon, 25 Mar 2002 18:24:56 GMT

"Patrick Doyle" <address@hidden> wrote in message
news:address@hidden
> Hi.  I hope this is helpful...
>
> When debugging a program that uses pthreads, a call to execv causes
> gdb to get mighty confused:
>
> (gdb) run
> Starting program: abc
> [New Thread 1024 (LWP 8440)]
> Breakpoint 2 (...)
> 736             execvp(argv[0], argv);
> (gdb) cont
> Continuing.
> Cannot find user-level thread for LWP 8445: generic error
> (gdb) bt
> Cannot find thread 1024: generic error
> (gdb) quit
> The program is running.  Exit anyway? (y or n) y
> Cannot find thread 1024: generic error
> (gdb) [5]   Terminated              gdb abc
>
> [6]+  Stopped                 gdb abc
> [bash]$ kill %
>
> [6]+  Stopped                 gdb abc
> [bash]$
> [6]+  Terminated              gdb abc
> [bash]$
>
> This is Red Hat 7.2 and GNU gdb 20020225.

Just wonder ...

What are you trying to achieve?
You replace the whole executable (if the exec.. succeeds) and would like to
get GDB keeping track of it. Besides, if there are other threads running,
they may get confused by the sudden replacement of the whole process code.

Tauno Voipio
tauno voipio @ iki fi




reply via email to

[Prev in Thread] Current Thread [Next in Thread]