* Problem about getopt.c
@ 2015-03-20 8:05 Fei Ding
2015-03-20 8:20 ` Fwd: " Fei Ding
2015-03-20 10:54 ` Eli Zaretskii
0 siblings, 2 replies; 3+ messages in thread
From: Fei Ding @ 2015-03-20 8:05 UTC (permalink / raw)
To: gdb
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?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Fwd: Problem about getopt.c
2015-03-20 8:05 Problem about getopt.c Fei Ding
@ 2015-03-20 8:20 ` Fei Ding
2015-03-20 10:54 ` Eli Zaretskii
1 sibling, 0 replies; 3+ messages in thread
From: Fei Ding @ 2015-03-20 8:20 UTC (permalink / raw)
To: gdb
And I am using gdb to debug gdb. You can get getopt.c in gdb/libiberty/getopt.c
---------- Forwarded message ----------
From: Fei Ding <fdingiit@gmail.com>
Date: 2015-03-20 16:05 GMT+08:00
Subject: Problem about getopt.c
To: "gdb@sourceware.org" <gdb@sourceware.org>
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?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problem about getopt.c
2015-03-20 8:05 Problem about getopt.c Fei Ding
2015-03-20 8:20 ` Fwd: " Fei Ding
@ 2015-03-20 10:54 ` Eli Zaretskii
1 sibling, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2015-03-20 10:54 UTC (permalink / raw)
To: Fei Ding; +Cc: gdb
> Date: Fri, 20 Mar 2015 16:05:39 +0800
> From: Fei Ding <fdingiit@gmail.com>
>
> /////////////////////////////////////////
> 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?
My crystal ball says that on your system the conditions for defining
ELIDE_CODE in getopt.c are fulfilled, and so libiberty's getopt is not
used.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-20 10:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-20 8:05 Problem about getopt.c Fei Ding
2015-03-20 8:20 ` Fwd: " Fei Ding
2015-03-20 10:54 ` Eli Zaretskii
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).