News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Passage program argument to the debugger

Started by VincentB, June 11, 2013, 03:33:32 PM

Previous topic - Next topic

VincentB

Hello,

I am with C::B 12.11, and I have a problem with passing command line arguments to the gdb.

I configured the command line arguments with Project -> Set program's argument..., but when the debugger starts, it does not pass these arguments to the executable.

I am quite confused because this used to work on this same project. It seems that I have unwillingly done something wrong...

Any sort of help is most welcome.

stefanos_

First of all, you are not providing any information, other than the C::B version you are using.

What OS are you using?
What compiler and what kind of built, 32 or 64?

I have tested it on my system with breakpoints, passed my arguments, and worked just fine.

VincentB

Compiler in MinGW, OS is MSWindows XP

Build is Nov 25 2012, 09:32:38 -wx2.8.12 (Windows, unicode) - 32bit

gdb version is :

GNU gdb (GDB) 7.5
Copyright (C) 2012 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-mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.

VincentB

By the way: just a suggestion: is would be practical if one could cut&paste the codeblocks version information from the about window.

oBFusCATed

VincentB: Please enable the full log in Settings -> Debugger and paste it here using code tags  "[ code ]" without the spaces.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

stefanos_

The only debugger issue I have right now is that it stays on "leave" step when I press F7 to follow the next line and does not end the program; I have to stop debugger myself. Oh well...

oBFusCATed

Quote from: ToApolytoXaos on June 11, 2013, 04:36:46 PM
The only debugger issue I have right now is that it stays on "leave" step when I press F7 to follow the next line and does not end the program; I have to stop debugger myself. Oh well...
No related and cannot be fixed, because the result is what you've told it -> Step to the next line, which is somewhere in the compiler's code.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

stefanos_


VincentB

ISSUE SOLVED ISSUE SOLVED ISSUE SOLVED ISSUE SOLVED ISSUE SOLVED

Hello,

Sorry for the disturbance I have caused. After enabling full log I realized that the arguments were passed correctly. My program was exiting very early for some other reason.

Thanks to oBFusCATed 8)  for the good suggestion.

VBR
    Vincent.