This is the mail archive of the gdb@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]

Re: optind


Hello, Daniel!

That was fast 8) , thanks much!

On Wed, Dec 10, 2003 at 09:49:18AM -0500, Daniel Jacobowitz wrote:
> The symbol exists in multiple shared objects...

Do you mean weak symbols within libc, or multiple definitions in other
libraries? ldd shows libc.so.6 and ld-linux.so.2, and nm -D shows that
optind exists only in libc. I've also searched glibc 2.3.2 sources and
couldn't find multiple optind definitions. Where do you think they are
defined?


> ... and gdb gets confused about which copy to print.

I thought they were resolved during link, and the resulting binary had
only one copy. From what you have said I understand the following: each
copy declared in different objects gets linked and is preserved in the
data section(s), all references to it are set to one address chosen as
"main" one, and there is no way to find out which one this "main" is.
Is this right?


FWIW, I've also tested with gdb 6.0, the result was the same.


With kind regards,
Baurjan.


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