0

In the following code:

for(int i = 0; i < argc; i++)
    cout << (i > 0 ? "  " : "") << argv << (i < argc - 1 ? " \\" : "")
         << endl;

I try to use "next" to step over, but always step into some other source file as I get the information:

517 __ostream_insert(__out, __s,
(gdb)
444 { return __check_facet(_M_ctype).widen(__c); }
(gdb)
53 if (!__f)
(gdb)
873 if (_M_widen_ok)
(gdb)
1169 __tmp[__i] = __i;
(gdb)
1168 for (size_t __i = 0; __i < sizeof(_M_widen); ++__i)
(gdb)
1169 __tmp[__i] = __i;
(gdb)
1168 for (size_t __i = 0; __i < sizeof(_M_widen); ++__i)
(gdb)
1169 __tmp[__i] = __i;

If I try to step out, I get:

(gdb) finish
"finish" not meaningful in the outermost frame.

Thanks for your help!

2
Contributors
5
Replies
6
Views
8 Years
Discussion Span
Last Post by lehe
0

What does "inlined code" mean?
The snippet of code is in main function and does not have anything specified as "inline".

0

But you have included things like iostream for example.

> __ostream_insert
This is what implements "cout <<"
so yeah, my guess is still that the code for cout has been inlined.

How did you compile it?

0

The Makefile is something like:

LDFLAGS=-static -lm -ljpeg -lpng -lz
OPTIMIZE_FLAG = -ggdb3 -DDEBUG
CXXFLAGS = -Wall $(OPTIMIZE_FLAG)
absurdity: xxx.o
	$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
Makefile.depend: *.h *.cc Makefile
	$(CC) -M *.cc > Makefile.depend
include Makefile.depend

How to tell cout is inlined?

0

Please comment if you have some. Any help is appreciated.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.