This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
tdep/1744: sparc solaris Call hangs after attach to waiting process
- From: larue at cadence dot com
- To: gdb-gnats at sources dot redhat dot com
- Cc: woodylarue_1 at earthlink dot net
- Date: 11 Aug 2004 16:37:26 -0000
- Subject: tdep/1744: sparc solaris Call hangs after attach to waiting process
- Reply-to: larue at cadence dot com
>Number: 1744
>Category: tdep
>Synopsis: sparc solaris Call hangs after attach to waiting process
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Aug 11 16:38:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: Woody LaRue
>Release: 6.1
>Organization:
>Environment:
sparc-sun-solaris2.7
>Description:
The following sequence causes gdb to hang:
1) Attach to a process that is waiting (sleeping or waiting on io)
2) Call a function from the gdb command prompt.
This occurs in 6.1 and 6.2. It was new in 6.1 and appears to be related to the changes in sparc-tdep.c that occured between 6.0 and 6.1. If I alter the function sparc32_push_dummy_code to actually push the code for the function call onto the stack (like it did in 6.0), then the hang does not occur.
>How-To-Repeat:
cat > ac.c
int dummy(int x)
{
return 2 * x + 1;
}
int main(int argc, char** argv)
{
sleep(10000);
}
^D
% gcc -g ac.c
% a.out &
[2] 20192
% gdb a.out
GNU gdb 6.2
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.7"...
(gdb) attach 20192
Attaching to program `/hm/larue/myCcode/a.out', process 20192
Reading symbols from /usr/lib/libc.so.1...done.
Loaded symbols for /usr/lib/libc.so.1
Reading symbols from /usr/lib/libdl.so.1...done.
Loaded symbols for /usr/lib/libdl.so.1
Reading symbols from /usr/platform/SUNW,Ultra-4/lib/libc_psr.so.1...done.
Loaded symbols for /usr/platform/SUNW,Ultra-4/lib/libc_psr.so.1
Retry #1:
Retry #2:
Retry #3:
Retry #4:
[New LWP 1]
Symbols already loaded for /usr/lib/libc.so.1
Symbols already loaded for /usr/lib/libdl.so.1
Symbols already loaded for /usr/platform/SUNW,Ultra-4/lib/libc_psr.so.1
0xff31eec0 in _sigsuspend () from /usr/lib/libc.so.1
(gdb) call dummy(5)
<Hang forever>
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: