Hi,

i have few programs which i have compiled using "make all". When i debug the main program, during debugging i get the following message :

****Stepping over inlined function code.***

As a result i am unable to debug the program line by line. The debugging is random. I am using gdb to debug

As an example :

I debug line 100 and then wish to debug the next line 101 by pressing "n", i am unable to do so. Because i get the above message and it debugs the line 300 instead of 101.

I have not defined any function as inline.
Please help
Thanks

Recommended Answers

All 6 Replies

Inline can be done if the compiler deems it necessary. What level of debugging / optimization do you have it set to?

I have -03 level of optimization. Some of the functions are defined as inline functions in the header file for some programs. And since i am compiling them with -ggdb option i am getting the error. Could that be the problem?

I have one more question. Following is my partial make file.

------------------------------------------------------------------------------

HEADERS =binary_base.h binary_clsgen.h binary_header.h

LIB_SRCS = binary_utils.cpp \
bianry_solver.cpp\
binary_base.cpp \
binary_dbase.cpp \
binary_c_wrapper.cpp \
binary_cpp_wrapper.cpp \

LIB_OBJS = $(LIB_SRCS:.cpp=.o)

$(LIB_OBJS): $(HEADERS) Makefile

.cpp.o:
$(CC) $(CFLAGS) $(MFLAGS) -c $< -ggdb
--------------------------------------------------------------------------

My question is if i wish to compile say 5 programs out of total 10 programs using -ggdb option and the remaining 5 programs without ggdb option how can i do that.

Thanks

Ideally, you should debug with every optimisation turned off.
Then you get to see the code do pretty much what you wrote it to do.

Ideally, you should debug with every optimisation turned off.
Then you get to see the code do pretty much what you wrote it to do.

*Nods*

i tried with optimization -o also but still i am not able to debug

Following are my flags :

CC = g++ -Wall
CFLAGS = -O

Try CC = g++ and CFLAGS = -Wall -g BUT once you have changed them is it 100% essentual to do a make clean before your make all . Otherwise you will fail to implement the change.

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.