public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* problem issuing 'call' command in gdb-5.2.1/5.3 on solaris when linked with libpthread
@ 2003-06-20 17:22 Sunil Alankar
  0 siblings, 0 replies; only message in thread
From: Sunil Alankar @ 2003-06-20 17:22 UTC (permalink / raw)
  To: Gdb@Sources. Redhat. Com; +Cc: Sunil Alankar

Hi,

  I have encountered this critical problem where the gdb 'call' command
errors out saying

"The program being debugged stopped while in a function called from GDB.
When the function (foo(void)) is done executing, GDB will silently
stop (instead of continuing to evaluate the expression containing
the function call)."

I can reproduce this with a very simple c program with no pthread creation
but linking with libpthread.
The version of gdb is 5.2.1 (can also see the problem on 5.3) on solaris 2.7
gcc 2.95.3 used with binutils 2.11.2

test.cpp :

#include <stdio.h>
int main()

{
  return 0;
}

void foo()
{
  printf("Function foo called...\n");
}

g++ -g test.cpp -pthread

% gdb a.out

(gdb) b main
Breakpoint 1 at 0x10574: file simple.cpp, line 5.
(gdb) r
Starting program:
/eng-qa/sunil/mttest/ui_test/utest/mt-debug/with-pthread/a.out
[New LWP 1]
[New LWP 2]
[New LWP 3]

Breakpoint 1, main () at simple.cpp:5
5         return 0;
(gdb) call foo()

Breakpoint 1, main () at simple.cpp:5
5         return 0;
The program being debugged stopped while in a function called from GDB.
When the function (foo(void)) is done executing, GDB will silently
stop (instead of continuing to evaluate the expression containing
the function call).
(gdb)


Any help is greatly appreciated. Is there a way to totally disable pthread
debud support
in gdb where gdb will not be aware of pthreads in the application.

Thanks

--Sunil




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-06-20 17:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-20 17:22 problem issuing 'call' command in gdb-5.2.1/5.3 on solaris when linked with libpthread Sunil Alankar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).