This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
gdb/266: Can't perform address lookup in shared object
- From: dddmitry at yahoo dot com
- To: gdb-gnats at sources dot redhat dot com
- Date: 23 Dec 2001 18:45:47 -0000
- Subject: gdb/266: Can't perform address lookup in shared object
- Reply-to: dddmitry at yahoo dot com
>Number: 266
>Category: gdb
>Synopsis: Can't perform address lookup in shared object
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Dec 23 10:48:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: dddmitry@yahoo.com
>Release: unknown-1.0
>Organization:
>Environment:
gdb 5.1, Solaris 8, Ultra-250, gcc 3.01 (32bit)
>Description:
"info symbol" and "bt" can't resolve symbol name for addresses in shared object.
There is a snip from debugging session ('test' resides in shared object):
[snip]
(gdb) info addr test
Symbol "test()" is a function at address 0xff380768.
(gdb) info symbol 0xff380768
No symbol matches 0xff380768.
(gdb) info addr main
Symbol "main" is a function at address 0x107a8.
(gdb) info sym 0x107a8
main in section .text
(gdb) info share
>From To Syms Read Shared Object Library
0xffffffffff3805a00xffffffffff380800Yes ./libShared.so
0xffffffffff2b73040xffffffffff2b84fcYes /usr/local/lib/libstdc++.so.3
0xffffffffff341fd00xffffffffff350020Yes /usr/lib/libm.so.1
0xffffffffff2616440xffffffffff26727cYes /usr/local/lib/libgcc_s.so.1
0xffffffffff19b5c00xffffffffff21a7c0Yes /usr/lib/libc.so.1
0xffffffffff3a077c0xffffffffff3a07d4Yes /usr/lib/libdl.so.1
[end snip]
>How-To-Repeat:
Compile next files as an execuatble and shared object respectively:
main.cpp
#include <stdio.h>
#include "shared.h"
int main()
{
int i;
i = test();
printf("i=%d\n", i);
return 0;
}
shared.h
#ifndef __shared_h__
#define __shared_h__
int test(void);
#endif //__shared_h__
shared.cpp
#include "shared.h"
int test(void)
{
int i = 5;
return i;
}
run gdb a.out
break main
run
info addr test
info symbol <addr of test>
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: