News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

How to add parameters to "main" in debug mode?

Started by sanron, October 16, 2008, 08:51:34 AM

Previous topic - Next topic

sanron

Hi all,
I want to debug a programme with parameters, but where set the parameters to?
Thanks!

MortenMacFly

Quote from: sanron on October 16, 2008, 08:51:34 AM
I want to debug a programme with parameters, but where set the parameters to?
- select your debug target
- menu "Project" -> "Set program's arguments"
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]


sanron

I have found the option, but cann't debug successfully.
the dubuger gave the following messages:
"
Building to ensure sources are up-to-date
Build succeeded
Selecting target:
Debug
Adding source dir: /mnt/hgfs/WinLinux/peer_demo/
Adding source dir: /mnt/hgfs/WinLinux/peer_demo/
Adding file: bin/Debug/peer_demo
Starting debugger:
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb Red Hat Linux (6.5-16.el5rh)
No symbol table is loaded.  Use the "file" command.
No symbol table is loaded.  Use the "file" command.
Debugger finished with status 0
"

What's wrong??

MortenMacFly

Quote from: sanron on October 16, 2008, 09:44:37 AM
No symbol table is loaded.  Use the "file" command.
Debug an application that has a symbol table loaded.
Thus compile/link with the debug switch and do *not* strip the symbols afterwards.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]