Chao Hai,

well to the best of my knowledge, gdb should not have to knwo where to look
for the files as it is launched on an executable. What is is used for is to
know in which function the problem happens. Then you should know in which
file you have implemented this function (else a grep command could help a
lot ;o) ).

have you had a look at the line 531 of packet.h (probably located in folder
/ns-allinone.../ns-version/common) ?

Ho I almost forgot: i am french so if you wanna discuss this topic off-line
in french, you may e-mail me.

Regards,

----------------------------------------------------------
Gilles BERTRAND
Telecom INT - University of Stuttgart
----------------------------------------------------------

2006/6/23, Hai Nam <[EMAIL PROTECTED]>:
>
> On 6/23/06, Gilles Bertrand <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > You may add -g to the compilation options (gcc -g ...). This can be done
> > in the Makefile.in file. Then you will be able to launch the gdb
> > debugger on ns executable file by:
> >
> > > gdb ns
> >
> > In the opened interpreter use the following commands:
> >
> > > r the_name_of_my_script.tcl
> > > bt
> >
> > And gdb will provide you with the last system calls before the
> > segmentation fault, allowing you to locate the source of the error.
> >
>
> Hello,
>
> [sorry for this off-topic post]
> Where do you run ns ? When I run "gdb ns" in the tcl script folder,
> then "r example.tcl" (in fact I do all that in ddd), they says that
> "file nnnnnn.ext" not found like this (in French):
> =====
> 0x0817059b in hdr_cmn::pop_src_rt() (this=0x89d4a38) at packet.h:531
> 531     packet.h: Aucun fichier ou répertoire de ce type.
>         in packet.h
> =====
>
> The same problem that I can't put a breakpoint or step outside the
> main program. How can you do so that gdb knows where to look for
> included files ?
>
> Regards,
>
>
> --
> Hai-Nam NGUYEN
> Elève 3A SLR, ENST Bretagne
> 2 rue de la Châtaigneraie, 35576 Cesson Sévigné
> Site web: http://www.jcisio.com
>

Reply via email to