This is the mail archive of the gdb-prs@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]

threads/1156: call a function from gdb doesn't work if -lpthread is linked in


>Number:         1156
>Category:       threads
>Synopsis:       call a function from gdb doesn't work if -lpthread is linked in
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 28 01:28:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Yu Zhang
>Release:        5.3
>Organization:
>Environment:
SunOS 5.8
>Description:
Calling a function from gdb5.3 doesn't work if -lpthread
is linked in. There is no such problem with gdb 5.0.

(gdb) call pp()

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

The content of test.c:

#include <stdio.h>
void pp() { printf("show something\n"); }
int main() {
    return 0;
}
>How-To-Repeat:
gcc -g test.c -lpthread
gdb a.out 
(gdb) b main
(gdb) run
(gdb) call pp()
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="test.c"
Content-Disposition: inline; filename="test.c"

#include <stdio.h>

void pp() { printf("show something\n"); }

int main() {
    return 0;
}


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