[ns] Can anyone tell me how to debug ns2 2.33 using gdb? No successful examples could have been googled yet.

2008-12-21 Thread matt Wood

Dear friends,
  I've read the ns-doc chap24 and chap28, and followed the
instructions (Q3) found in http://web.syr.edu/~dchen02/FAQ.txt,  but
when I try to debug using '$gdb ns' it says: no debugging symbols
found.

 Same questions can be found in the mail-list but they still
remain unresolved. Please tell me if this  2.33-allinone can be
debugged by gdb. And if it is not, what debugging method can I use  if
I want to add a new MAC protocol?

 Thank you in advance.

Yours sincerely,
Matthew Wood



Re: [ns] Can anyone tell me how to debug ns2 2.33 using gdb? No successful examples could have been googled yet.

2008-12-21 Thread Waleed Tuffaha

Hello Matt,

A while ago I followed the steps in that FAQ to enable the debugging in ns2
and it worked fine with me. I used gdb to debug my C++ code as follows:
gdb ns
run my_tcl_script.tcl

My code used to give me segmentation fault and I used gdb to find out where
the problem was.
I debug my Tcl code using "puts" to print on the output what is happening. I
know it is not much efficient but till now it was sufficient.

Best regards,

On Sun, Dec 21, 2008 at 11:37 AM, matt Wood  wrote:

>
> Dear friends,
>  I've read the ns-doc chap24 and chap28, and followed the
> instructions (Q3) found in 
> http://web.syr.edu/~dchen02/FAQ.txt,
>  but
> when I try to debug using '$gdb ns' it says: no debugging symbols
> found.
>
> Same questions can be found in the mail-list but they still
> remain unresolved. Please tell me if this  2.33-allinone can be
> debugged by gdb. And if it is not, what debugging method can I use  if
> I want to add a new MAC protocol?
>
> Thank you in advance.
>
> Yours sincerely,
> Matthew Wood
>
>


-- 
Waleed Tuffaha.


Re: [ns] Can anyone tell me how to debug ns2 2.33 using gdb? No successful examples could have been googled yet.

2008-12-21 Thread Sidney Doria

To debug I suggest you use Eclipse and gdb;

You must open the entire simulator in a project in eclipse.

details are in here:
http://nsnam.isi.edu/nsnam/index.php/Developer_Information#Development_with_Eclipse

Turn on symbols generation in the Makefile (don't forget this or you
will receive a no symbols error).

use

CCOPT = -g

To debug oTCL code, I recommend Pedro Estrela's site. You'll find all
about oTCL debugging.

Sidney Doria
UFCG / BRAZIL

2008/12/21 matt Wood :
>
> Dear friends,
>  I've read the ns-doc chap24 and chap28, and followed the
> instructions (Q3) found in http://web.syr.edu/~dchen02/FAQ.txt,  but
> when I try to debug using '$gdb ns' it says: no debugging symbols
> found.
>
> Same questions can be found in the mail-list but they still
> remain unresolved. Please tell me if this  2.33-allinone can be
> debugged by gdb. And if it is not, what debugging method can I use  if
> I want to add a new MAC protocol?
>
> Thank you in advance.
>
> Yours sincerely,
> Matthew Wood
>
>



-- 
Sidney Doria
Redes ad hoc móveis
Doutorado em Computação
UFCG
Brasil

"Nessa jornada, o conhecimento será o seu escudo..."
(Mestre dos Magos no episódio do grimoire de ouro)



Re: [ns] Can anyone tell me how to debug ns2 2.33 using gdb? No successful examples could have been googled yet.

2008-12-21 Thread matt Wood

Hi,
 I think the problem is duet to the dynamic loadable libraries which
ns2.33 uses. When I use 'dll-symbols' command in gdb and set breakpoints it
says:
warning:
can not insert breakpoint
Error accessing memory address 0x100ae1a0: Input/Output error.

 Could you mail me the steps in which you successfully debugging
your program? After using 'dll-symbols' command to load the libns.dll, I an
use 'list' command to show the source files, but, unfortunately, setting
breakpoints still does not work.

Bests,
Matt


2008/12/21 Waleed Tuffaha 

> Hello Matt,
>
> A while ago I followed the steps in that FAQ to enable the debugging in ns2
> and it worked fine with me. I used gdb to debug my C++ code as follows:
> gdb ns
> run my_tcl_script.tcl
>
> My code used to give me segmentation fault and I used gdb to find out where
> the problem was.
> I debug my Tcl code using "puts" to print on the output what is happening.
> I know it is not much efficient but till now it was sufficient.
>
> Best regards,
>
>
> On Sun, Dec 21, 2008 at 11:37 AM, matt Wood wrote:
>
>>
>> Dear friends,
>>  I've read the ns-doc chap24 and chap28, and followed the
>> instructions (Q3) found in 
>> http://web.syr.edu/~dchen02/FAQ.txt,
>>  but
>> when I try to debug using '$gdb ns' it says: no debugging symbols
>> found.
>>
>> Same questions can be found in the mail-list but they still
>> remain unresolved. Please tell me if this  2.33-allinone can be
>> debugged by gdb. And if it is not, what debugging method can I use  if
>> I want to add a new MAC protocol?
>>
>> Thank you in advance.
>>
>> Yours sincerely,
>> Matthew Wood
>>
>>
>
>
> --
> Waleed Tuffaha.
>


Re: [ns] Can anyone tell me how to debug ns2 2.33 using gdb? No successful examples could have been googled yet.

2008-12-23 Thread matt Wood

Hello Walled,
  I installed a Ubuntu and tried those steps again. It works. Thank you
very much.
Bests,
Matt

2008/12/22 Waleed Tuffaha 

> Hey Matt,
>
>  yes, my version is ns-2.33. But i'm running on Linux (Ubuntu).
>
>
> On Mon, Dec 22, 2008 at 5:32 AM, matt Wood  wrote:
>
>> Dear Waleed,
>>  It's very happy to hear that you succeeded in debugging it by
>> following that FAQ in 
>> http://web.syr.edu/~dchen02/FAQ.txt(Q3).
>>  Is your ns2 version 2.33? And is it running on cygwin?
>>
>>  The following is the message shown when I type 'gdb ns':
>>
>> $gdb ns
>> GNU gdb 6.8.0.20080328-cvs
>> (cygwin-special)
>> Copyright (C) 2008 Free Software Foundation, Inc.
>> License GPLv3+: GNU GPL version 3 or later <
>> http://gnu.org/licenses/gpl.html>
>> This is free software: you are free to change and redistribute it.
>> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
>> and "show warranty" for details.
>> This GDB was configured as "i686-pc-cygwin"...
>> (no debugging symbols found)
>>
>>  It will be very nice if you can provide me more information.
>> Thank you.
>>
>> Best regards,
>> Matthew
>>
>> 2008/12/21 Waleed Tuffaha 
>>
>> Hello Matt,
>>>
>>> A while ago I followed the steps in that FAQ to enable the debugging in
>>> ns2 and it worked fine with me. I used gdb to debug my C++ code as follows:
>>> gdb ns
>>> run my_tcl_script.tcl
>>>
>>> My code used to give me segmentation fault and I used gdb to find out
>>> where the problem was.
>>> I debug my Tcl code using "puts" to print on the output what is
>>> happening. I know it is not much efficient but till now it was sufficient.
>>>
>>> Best regards,
>>>
>>>
>>> On Sun, Dec 21, 2008 at 11:37 AM, matt Wood wrote:
>>>

 Dear friends,
  I've read the ns-doc chap24 and chap28, and followed the
 instructions (Q3) found in 
 http://web.syr.edu/~dchen02/FAQ.txt,
  but
 when I try to debug using '$gdb ns' it says: no debugging symbols
 found.

 Same questions can be found in the mail-list but they still
 remain unresolved. Please tell me if this  2.33-allinone can be
 debugged by gdb. And if it is not, what debugging method can I use  if
 I want to add a new MAC protocol?

 Thank you in advance.

 Yours sincerely,
 Matthew Wood


>>>
>>>
>>> --
>>> Waleed Tuffaha.
>>>
>>
>>
>
>
> --
> Waleed Tuffaha.
>