This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB 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]

problem issuing 'call' command in gdb-5.2.1/5.3 on solaris when linked with libpthread


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





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