This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb/1483: symbols present in multiple files are displayed wrongly


>Number:         1483
>Category:       gdb
>Synopsis:       symbols present in multiple files are displayed wrongly
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 12 15:08:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     ibr@ata.cs.hun.edu.tr
>Release:        6.0
>Organization:
>Environment:

>Description:
gdb finds the wrong copy of a symbol.

http://sources.redhat.com/ml/gdb/2003-12/msg00160.html
>How-To-Repeat:
given the following program:

#include <unistd.h>

int main()
{
	printf("%p\n", &optind);
}


I do:

gcc -g a.c
./a.out
nm a.out |grep optind


I see, respectively:

0x80495ac
080495ac B optind@@GLIBC_2.0


After that I do:

gdb a.out
b main
r
p &optind


I see:

$1 = (int *) 0x4014814c,

whereas I expect it to be 080495ac.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]