How to skip system functions while stepping through the code?

Geert Vancompernolle <[email protected]>
Newsgroups gmane.comp.debugging.ddd.general
Message-ID <[email protected]>
Hi,

I have a small C++ program that I want to debug with DDD.

This is the body of the module "main.cpp":

#include "stdio.h"

#include "i2cexample.hpp"

int main( void )

{

printf( "\n\n" );

printf( "*******************************************************\n"
);

printf( "* Home Automation System - HAS (c) 2008, GeVaDomotics *\n"
);

printf( "*******************************************************\n"
);

printf( "\n\n" );

CI2cExample* tryout = new CI2cExample();

(void)tryout->RunExample();

delete tryout;

tryout = 0;

return( 0 );

}

As one can see, there's a call to a C++ constructor CI2cExample().

Now, when stepping through this small application with the "Step"
function of DDD, then I can smoothly step over the "printf()"
statements. However, my intention is to step into the constructor of
CI2cExample(), but when pressing "Step" at that time, the debugger
wants to do into files of which I don't have the source code.

Below is the sequence which is followed by DDD, the moment I reach the
line where the "new CI2cExample()" call is located and when I press the
"Step" button:

Breakpoint 13, main () at main.cpp:12

(gdb) step

operator new (sz=1) at
/home/cii/DIST/tools/cris-dist/gnu-toplev/libstdc++-v3/libsupc++/new_op.cc:46

in
/home/cii/DIST/tools/cris-dist/gnu-toplev/libstdc++-v3/libsupc++/new_op.cc

(gdb) step

48 in
/home/cii/DIST/tools/cris-dist/gnu-toplev/libstdc++-v3/libsupc++/new_op.cc

(gdb) step

__libc_malloc (bytes=0) at malloc.c:2697

in malloc.c

Current language: auto; currently c

(gdb) step

2709 in malloc.c

(gdb) step

2711 in malloc.c

(gdb) step

2712 in malloc.c

(gdb) step

2714 in malloc.c

(gdb) step

chunk_alloc (ar_ptr=0xfd100, nb=524480) at malloc.c:2763

(gdb) step

2765 in malloc.c

(gdb) step

2769 in malloc.c

(gdb) step

2770 in malloc.c

(gdb) step

2773 in malloc.c

(gdb) step

2775 in malloc.c

(gdb) step

2776 in malloc.c

(gdb) step

2778 in malloc.c

(gdb) step

2787 in malloc.c

(gdb) step

2821 in malloc.c

(gdb) step

2947 in malloc.c

(gdb) step

2976 in malloc.c

(gdb) step

2977 in malloc.c

(gdb) step

2978 in malloc.c

(gdb) step

2979 in malloc.c

(gdb) step

2983 in malloc.c

(gdb) step

__libc_malloc (bytes=1123064) at malloc.c:2715

(gdb) step

2735 in malloc.c

(gdb) step

2736 in malloc.c

(gdb) step

2737 in malloc.c

(gdb) step

operator new (sz=12) at
/home/cii/DIST/tools/cris-dist/gnu-toplev/libstdc++-v3/libsupc++/new_op.cc:49

in
/home/cii/DIST/tools/cris-dist/gnu-toplev/libstdc++-v3/libsupc++/new_op.cc

Current language: auto; currently c++

(gdb) step

63 in
/home/cii/DIST/tools/cris-dist/gnu-toplev/libstdc++-v3/libsupc++/new_op.cc

(gdb) step

CI2cExample (this=0x1122f0) at i2cexample.cpp:25

Here, the debugger finally gets into the constructor of the
CI2cExample() class. In that constructor, there are again calls to the
constructor of another class. This is the code:

CI2cExample::CI2cExample( void )

{

pcf8574 = new CI2cHal( 0x40 );

pcf8591 = new CI2cHal( 0x90 );

nvm = new CI2cHal( 0xA0 );

}

Also here, the whole history repeats: when I press the "Step" button to
go into the constructor of CI2cHal, there are again lots of attempts to
open the source files of functions of which I don't have the source
file.

Question:

Is there a setting I can do to avoid DDD trying to go into functions of
which I don't have the source code? Using "Next" in stead of "Step" is
not an option, since this skips one line at a time and never goes into
code of which I do have the sources.

Any help much appreciated.

Best rgds,

--Geert

_______________________________________________
Ddd mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/ddd
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.