This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Problem about getopt.c
- From: Fei Ding <fdingiit at gmail dot com>
- To: "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Fri, 20 Mar 2015 16:05:39 +0800
- Subject: Problem about getopt.c
- Authentication-results: sourceware.org; auth=none
I've send a mail talking about problem about getopt.c, and I will
describe it a litter clear here.
I want to trace source code of _getopt_internal() in getopt.c, so I
try to make a breakpoint on _getopt_internal, but gdb tell me there is
no such symbol and breakpoint set failed, so, I try to set breakpoint
as filename:linenum, but I cannot get getopt.c, gdb tell me no such
file. I set the directiory, no effect. And then, I use nm tool of UNIX
to check libiberty.a, which getopt.o will be merged into. And I get
this:
/////////////////////////////////////////
getopt.o:
getopt1.o:
getpwd.o:
U __errno_location
0000000000000008 b failure_errno.3486
U free
U getcwd
U getenv
0000000000000000 T getpwd
0000000000000000 b pwd.3485
U stat
U xmalloc
/////////////////////////////////////////
Nothing there in getopt.o and getopt1.o, it is so strange to me.
What's more, I write a printf() in the beginning of
_getopt_internal(), and make clean && make && make install, but there
is no printing message.
Did I miss something?