Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > Mac Programmer Tools > Re: Providing s...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 4 Topic 539 of 637
Post > Topic >>

Re: Providing scanf() input in debugger

by Michael Hopkins <michael.hopkins@[EMAIL PROTECTED] > Jun 11, 2006 at 04:20 PM

On 11/6/06 12:20, in article
1150024815.714136.60760@[EMAIL PROTECTED]
"vze35xda@[EMAIL PROTECTED]
"
<vze35xda@[EMAIL PROTECTED]
> wrote:

>      Did you start a standard I/O log wiindow in the debugger ?  That's
> where you sscanf input will be passed in.

Do you mean the window with 'gdb' in botton-left corner?  I think it's
called the debugger console.  Yes, I can see this but it doesn't seem to
accept input like the normal run window.

This is an example:

    Please input variable A : 0  (<- my input is "0")
    Undefined command: "0".  Try "help".
    (gdb) 


> Note: There are some
> differences between this and a std shell window but for this you should
> be OK.  If not if you can change your code to do fgets and then  from
> stdin  and do sscanf on the result then I am sure it will work 'cause I
> do this all the time.
> 
>      On the reading cmd line arguments, are you looking at
> 
>      main( int argc, char **argv)
>      {
>      }
> 
> argc and argc ?  

Yes.

> I have not had any trouble using these and setting
> them in the window you get from clicking your program under the
> Executables tab in the project window.  Then just add them to the
> arguments window.
> 
>     --jim
> 
I think this part is working OK for me already.

M


_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

        _/    _/   _/_/_/             Hopkins Research Ltd
       _/    _/   _/    _/
      _/_/_/_/   _/_/_/          http://www.hopkins-research.com/
     _/    _/   _/   _/
    _/    _/   _/     _/               'touch the future'
                   
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
 




 4 Posts in Topic:
Providing scanf() input in debugger
Michael Hopkins <micha  2006-06-11 11:16:46 
Re: Providing scanf() input in debugger
"vze35xda@[EMAIL PRO  2006-06-11 04:20:15 
Re: Providing scanf() input in debugger
Michael Hopkins <micha  2006-06-11 16:20:37 
Re: Providing scanf() input in debugger
"vze35xda@[EMAIL PRO  2006-06-12 13:10:44 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 9:28:32 CST 2008.