[ns] Debugging NS with GDB/DDD. (2nd time)

Pedro Estrela pedro.estrela at inesc.pt
Wed May 12 04:59:04 PDT 2004


The problem is this:

"which has no line number information."

Have you compiled the code it the -g option?

Pedro Estrela

> -----Original Message-----
> From: ns-users-bounces at ISI.EDU [mailto:ns-users-bounces at ISI.EDU] On
Behalf
> Of fkeceli
> Sent: quarta-feira, 12 de Maio de 2004 2:22
> To: NS-USERS
> Subject: [ns] Debugging NS with GDB/DDD. (2nd time)
> 
> 
> Hi all,
> 
> I am sending this mail again, because I need an urgent solution. Thank
> you for your time.
> 
> I cannot debug inside the C++ functions with GDB. I set a breakpoint
but
> step or next commands result with just an exit from that function to
> calling or called function. Can't I debug inside the functions? How?
> 
> A similar problem with DDD. Although I define source file directory as
> root NS directory from GDB preferences, DDD cannot find source files.
> 
> I'll appreciate the help. Regards,
> 
> Inanc
> 
> PS: I am attaching an example of a GDB output in case it may visualize
> my problem to you. I also tried to use GDB with the suggested macro in
> the mailing list, but it didn't help.
> (http://mailman.isi.edu/pipermail/ns-users/2004-March/040850.html)
> 
>
------------------------------------------------------------------------
> -
> 
> [iinan at orange inanc]$ gdb ns
> GNU gdb 6.0
> Copyright 2003 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and
you
> are welcome to change it and/or distribute copies of it under certain
> conditions. Type "show copying" to see the conditions. There is
> absolutely no warranty for GDB.  Type "show warranty" for details.
This
> GDB was configured as "i686-pc-linux-gnu"...
> (gdb) b Mac802_11::checkBackoffTimer()
> Breakpoint 1 at 0x810e9a2
> (gdb) r 2nudp_11b.tcl
> Starting program: /usr/local/bin/ns 2nudp_11b.tcl
> num_nodes is set 2
> warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
> INITIALIZE THE LIST xListHead Location 0: X 0 Y  0 Location 1: X 5 Y
0
> Setting up traffic between node 0 with node 1 Starting
Simulation...with
> 2 number of nodes
> 
> Breakpoint 1, 0x0810e9a2 in Mac802_11::checkBackoffTimer() ()
> (gdb) s
> Single stepping until exit from function
> _ZN9Mac802_1117checkBackoffTimerEv,
> which has no line number information.
> 0x0810e697 in Mac802_11::setTxState(MacState) ()
> (gdb) n
> Single stepping until exit from function
> _ZN9Mac802_1110setTxStateE8MacState,
> which has no line number information.
> 0x0810be61 in Mac802_11::check_pktTx() ()
> (gdb)
> 





More information about the Ns-users mailing list