0

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

4
Contributors
6
Replies
7
Views
8 Years
Discussion Span
Last Post by StuXYZ
0

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

0

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

0

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.

0

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*

0

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

Following are my flags :

CC = g++ -Wall
CFLAGS = -O

0

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.

This article 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.