gdb/266: Can't perform address lookup in shared object
Thu Nov 1 10:28:00 GMT 2001

>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
>Release:        unknown-1.0
gdb 5.1, Solaris 8, Ultra-250, gcc 3.01 (32bit)
"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):


(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         ./
0xffffffffff2b73040xffffffffff2b84fcYes         /usr/local/lib/
0xffffffffff341fd00xffffffffff350020Yes         /usr/lib/
0xffffffffff2616440xffffffffff26727cYes         /usr/local/lib/
0xffffffffff19b5c00xffffffffff21a7c0Yes         /usr/lib/
0xffffffffff3a077c0xffffffffff3a07d4Yes         /usr/lib/

[end snip]
Compile next files as an execuatble and shared object respectively:


#include <stdio.h>
#include "shared.h"

int main()
	int i;
	i = test();
	printf("i=%d\n", i);
	return 0;


#ifndef __shared_h__
#define __shared_h__

int test(void);

#endif //__shared_h__


#include "shared.h"

int test(void)
	int i = 5;
	return i;

run gdb a.out
break main
info addr test
info symbol <addr of test>


More information about the Gdb-prs mailing list