I've built your program and Valgrind prints:
input i
I is : 1

, so everything is ok for me.

BTW, --db-attach is unimplemented on OS X, so this flag won't help in
the case of any error.

Alex.

On Mon, Apr 12, 2010 at 2:14 PM, Anna Ceguerra <[email protected]> wrote:
> Hi,
> I  am trying to do the following (valgrind 3.5.0, mac osx):
> valgrind --db-attach=yes --log-file=testout.txt myprogram < input.txt
> where input.txt contains the number 1
> and myprogram is as follows:
> #include <iostream>
> #include <cstdlib>
> using namespace std;
> int main()
> {
> unsigned int i;
> cout << "input i" << endl;
> cin >> i;
> cout << "I is : " << i << endl;
> }
>
> But valgrind keeps exiting without even printing "input i"
> Is there anything that I'm doing wrong?
> Thanks for your help.
> Regards,
> Anna.
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Valgrind-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/valgrind-users
>
>



-- 
Alexander Potapenko
Software Engineer
Google Moscow

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to