This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
shlibs/1990: Can't step in shared-library code of attached process
- From: quiver2k at ybb dot ne dot jp
- To: gdb-gnats at sources dot redhat dot com
- Cc: yendoh at fxis dot co dot jp
- Date: 15 Aug 2005 06:23:28 -0000
- Subject: shlibs/1990: Can't step in shared-library code of attached process
- Reply-to: quiver2k at ybb dot ne dot jp
>Number: 1990
>Category: shlibs
>Synopsis: Can't step in shared-library code of attached process
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Aug 15 06:28:00 UTC 2005
>Closed-Date:
>Last-Modified:
>Originator: quiver2k@ybb.ne.jp
>Release: unknown-1.0
>Organization:
>Environment:
My Environments are:
CPU: Intel(R) Celeron(R) CPU 2.40GHz
OS: Fedora core 3
Kernel: 2.6.12 (kernel-2.6.12-1.1372_FC3)
gdb: 6.3
>Description:
I'm trying to step into shared-library code of attached process. I can't step into library-function at the first call. But I can step in the function at the second call. Can I step into library-function at the first the?
The followings are sample code:
void foo() {
printf("foo\n");
}
int main(int argc, char *argv[])
{
char buf[128];
printf("attach me(pid=%d)> ", getpid());
fgets(buf, sizeof(buf), stdin);
foo();
bar(); /* can't step-in */
bar();
bar();
return 0;
}
Here, function bar() is defined in the shared library libbar.so.
To step into bar, I took the followings:
1. This program prompts "attach me(pid=18130)>".
2. I attached the process with id 18130
3. I set a break point at "foo();" in main
4. I typed "info sharedlibrary"
(gdb) info sharedlibrary
> From To Syms Read Shared Object Library
0xb7f6644c 0xb7f66564 Yes /home/yendoh/link/libbar.so
0x0088cc00 0x0097ccd0 Yes /lib/tls/libc.so.6
0x008197a0 0x0082b58f Yes /lib/ld-linux.so.2
5. continued
6. The process was breakd at "foo():", I could step-in foo().
7. I tried to step into "bar();" , but I couldn't step-in.
8. I could step-in the second and third call of bar().
>How-To-Repeat:
I attached my-program. To run the program:
1. make
2. make run
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/x-compressed; name="stepin.tgz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="stepin.tgz"
H4sIAAAAAAAAC+2XbWvbMBDH+7b6FIfHmB3ixE+xR7IWOvpihQxGGYzRlVaR5VjMkY0sZ7DR7z75
IXGyDvJmbsvi/wvndDqdzo5/0SWXNGN8vMBiRE46km1Zvu/DiVWp/YSNAgtsy/H9wPNcxwI18Cdq
/klU5BILVZJIU/k0O74ovWKcJEVI4V0uQ5aO4nOE1ikLQb0RugG/UPn9ZIJxGema8n3jmjFDD+i5
6+71b5S3/Mdd7XGQf9tr+J8ErutV/PsedFXOvo6c/5b1Wc/0Earhf4UZ76wBOMS/tz3/J4EdOIr/
sgGAjqr5Q0fO/1/O/9ZVcKa8ez6tOim0pkmI0vRRk6B8myYBKQ+Ur5ZeGlgsyRBIjAUMlL2+uTVQ
vbTyLYroxnbe3s72smEpMYlhRfWMhWevQ+MctCEsqVRD3TDq4EiNc10lGELOftI0Km1DDdQtcRVT
B5W1Nnb9gwfjARDM30goKTAZh8F4Z3rXrGxBZSE4WP9T/9Pw/xF/pxFLaCd7HOLf9Vv+Xbvi33MC
6KSWRzpy/nGSTCFhixLrPIUcr7KEIrT1TKH6a1hdY3S6JATMdGeBuQTzi0oCZq4gpiGYUcbqcIJQ
nW4K9fFSJ2kXb9PVYW2uJtycj8BMVCxCJKGYT9GpWKkNNvFtIiSKcpbyNcwv7+ZX768vrr/efbr4
/OHsPvsR3sNo3NzZcz/vXr169Xop+g3ZMNP+ABQAAA==