How to Debug A program using ddd

How to Debug A program using ddd

Post by Yani » Fri, 15 Mar 2002 02:09:13



Hello,
i creates a program and compile it using the
xlC -o ./../hello  -g hello.cpp

when i tryed to debug it i went into the directory where hello is
created and
type:
ddd hello
but the ddd could not open my source file , i try to used with open
source with no success .
do i miss somthing ,
should i set any flags to the ddd or in the enviroment ?

thanks
Yaniv

 
 
 

How to Debug A program using ddd

Post by Joerg Brueh » Sat, 16 Mar 2002 22:04:23


Hello!


> Hello,
> i creates a program and compile it using the
> xlC -o ./../hello  -g hello.cpp

> when i tryed to debug it i went into the directory where hello is
> created and
> type:
> ddd hello
> but the ddd could not open my source file , i try to used with open
> source with no success .
> do i miss somthing ,
> should i set any flags to the ddd or in the enviroment ?

I am just using "ddd" on Tru64, and I got it working as soon as
I had the sources and the generated program in the same directory.
This is also the run directory when using the program.

Another requirement seems to be that the program is built using the
"-g" compiler switch, without it I also could _not_ open any source.

HTH,
Joerg Bruehe

--
Joerg Bruehe, SQL Datenbanksysteme GmbH, Berlin, Germany
     (speaking only for himself)


 
 
 

How to Debug A program using ddd

Post by Christian Monfor » Sun, 17 Mar 2002 00:04:21



> Hello,
> i creates a program and compile it using the
> xlC -o ./../hello  -g hello.cpp

> when i tryed to debug it i went into the directory where hello is
> created and
> type:
> ddd hello
> but the ddd could not open my source file , i try to used with open
> source with no success .
> do i miss somthing ,
> should i set any flags to the ddd or in the enviroment ?

You can:

1) Use full path to name source files when compiling , so that ddd (in
fact the underlying de* - in your case must be dbx) can find its
way to the source files.
(I don't remeber if there is an option in to force xlC to use full
pathnames automatically.)

2) At ddd prompt (which is in fact dbx prompt), use "use" command to set
search directory for source files (See syntax below)
(dbx) help use
use
use <directory-list>
        Set the list of directories to be searched when looking
        for source files. If no argument is specified, the current
        list if directories to be searched is displayed.

3) If compiling the way you did, put source file in the executable
directory (which is not a very nice solution...)

And remember you always have the de* online help at ddd prompt
(just type "help")...

Christian

 
 
 

1. debugging dhcp cient using ddd

Hai

            Can any ony help me to debug a dhcp client source code
using a DDD debugger. i have installed dhcp client rpm in my linux
machine. please tell me in detail
             1. how to debug that code using a DDD debugger.also can
any one hepl me to understand  the source code of it and its working
method of dhcp client.
             2. Please tell me how my dhcp discover packet is send
initally to a broad cast address.

             3. Please tell me how my dhcp discover message is
enclosed and send throug the network. how does it is really sent.

             4. Any one please reply to my questions in detail.

2. CMD640 ide controller chip prbs?

3. Using GDB to debug a program that uses fork(2)?

4. Throttling bandwidth / user transfer quotas

5. How to debug using workshop when my program uses Xerces parser

6. 3com 3c579-TP Network card

7. gdb/ddd shared library debugging problem

8. Making modem louder OR where are the AT strings kept?

9. help about ddd debug tool .

10. Debugging width DDD !! Please Help Me !!!!!

11. DDD - GDB - FORTRAN - Debug

12. Debugging width DDD !! Please Help Me !!!!!

13. DDD - FORTRAN - DEBUG