This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
gdb/2347: gdb 6.7 can't attach to process
- From: pdubuc at cas dot org
- To: gdb-gnats at sources dot redhat dot com
- Date: 25 Oct 2007 18:43:37 -0000
- Subject: gdb/2347: gdb 6.7 can't attach to process
- Reply-to: pdubuc at cas dot org
>Number: 2347
>Category: gdb
>Synopsis: gdb 6.7 can't attach to process
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: unassigned
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Thu Oct 25 18:48:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator: Paul M. Dubuc
>Release: 6.7
>Organization:
>Environment:
uname -a
Linux mrldev32 2.6.9-42.0.10.ELlargesmp #1 SMP Fri Feb 16 17:25:40 EST 2007 x86_64 GNU/Linux
cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 4)
gdb32 --version
GNU gdb 6.7
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=i686-redhat-linux".
file `which gdb32`
/projects/pmd25/gnu34/Linux/x86_64/bin/gdb32: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), not stripped
gdb64 --version
GNU gdb 6.7
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=x86_64-redhat-linux"
file `which gdb64`
/projects/pmd25/gnu34/Linux/x86_64/bin/gdb64: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.4.0, dynamically linked (uses shared libs), not stripped
>Description:
I build both a 32 and a 64 bit version of gdb because we run both kinds of processes. With gdb 6.7, neither version is able to attach to a process of its corresponding type. I'm not sure why the configurator picked x86_64-unknown-linux-gnu instead of x86_64-redhat-linux for the host triplet, but I notice that 'uname -p' says "unknown" for the processor type. If I'm building these wrong, maybe you can tell me what configuration options to use for these machines.
>How-To-Repeat:
cat loop.c
main()
{
while(1) { sleep(10); }
}
gcc -m32 -g loop.c -o a.out32
gcc -g loop.c -o a.out64
file a.out32
a.out32: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), not stripped
file a.out64
a.out64: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.4.0, dynamically linked (uses shared libs), not stripped
./a.out32 &
./a.out64 &
ps
PID TTY TIME CMD
45639 pts/28 00:00:00 ksh
31739 pts/28 00:00:00 a.out64
6223 pts/28 00:00:00 a.out32
24575 pts/28 00:00:00 ps
gdb32
GNU gdb 6.7
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=i686-redhat-linux".
(gdb) attach 6223
Don't know how to attach. Try "help target".
(gdb) q
gdb64
GNU gdb 6.7
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=x86_64-redhat-linux".
(gdb) attach 31739
Don't know how to attach. Try "help target".
(gdb) q
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: