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!

Inlined code perhaps?

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

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?

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?

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.