How to generate debug info for gdb or insight

126 views
Skip to first unread message

Jelline

unread,
Mar 5, 2014, 5:49:39 AM3/5/14
to ns-3-...@googlegroups.com
Dear Sir/Madam,

Nice day. I have installed ns3 and insight normally with official guidelines. While running "insight %s", I can only view assembly code, no source code. The reason is without generating debug information (there is no debug folder under build/).

So, I need to know how to generate debug info for gdb. Add "-g" to which files or modify "CFLAGS"? If yes, which file?

Thanks in advance. 

Best regards,
Jelline 

Konstantinos

unread,
Mar 5, 2014, 5:55:27 AM3/5/14
to ns-3-...@googlegroups.com
Hi,

If you want to run an ns-3 script under gdb you should follow the manual explaining it here 
There is no need to change any flag or file.
I haven't used insight, but I guess it is a similar approach. 

Jelline

unread,
Mar 5, 2014, 1:04:41 PM3/5/14
to ns-3-...@googlegroups.com
Dear Konstantinos,

Thanks for your prompt and kind reply.

Insight can be viewed as the GUI of GDB. I use "=gdb %s" and it still couldn't work. 

(gdb) l
1       <<C++-namespaces>>: No such file or directory
(gdb) print val
No symbol "val" in current context

So, I think there is a problem with configuring the options of compile, such as CFLAGS, CPPFLAGS.

By the way, how to remove "all the warnings are treated as errors" in ns3?  I suppose to change the flag "-Werror" to "-Wall". But I don't know which file is the flag placed. 

Thanks again,
Jelline

Konstantinos

unread,
Mar 5, 2014, 1:29:57 PM3/5/14
to ns-3-...@googlegroups.com
After the ./waf --run <program> --command-template="gdb %s"
Have you 'run' the program in gdb? 

(gdb) run

If you want graphical debugger you can use the one of Eclipse 

Qiankun Su

unread,
Mar 5, 2014, 1:42:57 PM3/5/14
to ns-3-...@googlegroups.com
Hi Konstantinos,

Thanks again. Yes, I run my program in "gdb %s". 

I need to learn more about how to configure waf build system.

Well, I will try Eclipse. Thank you very much.

All the best to you.

Jelline

--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/67sc8XpPDYo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages