|
From: Anna C. <ann...@ya...> - 2010-04-12 10:41:10
|
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.
|
|
From: Alexander P. <gl...@go...> - 2010-04-12 10:51:31
|
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 <ann...@ya...> 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
> Val...@li...
> https://lists.sourceforge.net/lists/listinfo/valgrind-users
>
>
--
Alexander Potapenko
Software Engineer
Google Moscow
|
|
From: ajit g. <pea...@ya...> - 2010-04-12 12:39:18
|
Hi,
I tried running the same code but I am getting different kind of errors.
These are the errors
valgrind --db-attach=yes --log-file=testout.txt myprogram.cpp < input.txt
myprogram.cpp: line 3: using: command not found
myprogram.cpp: line 4: syntax error near unexpected token `('
myprogram.cpp: line 4: `int main(void)'
But when I run the above program using g++ with the following steps my program gets compiled correctly.
g++ myprogram.cpp ===>No wrrors reported.
Why am I getting errors when I run the command
valgrind --db-attach=yes --log-file=testout.txt myprogram.cpp <
input.txt.I am running the above command in RHEL.
Please let me know if I am doing anything incorrect?
Thanks,
Ajit
--- On Mon, 4/12/10, Alexander Potapenko <gl...@go...> wrote:
From: Alexander Potapenko <gl...@go...>
Subject: Re: [Valgrind-users] 3.5.0, macosx snow leopard, stdin
To: "Anna Ceguerra" <ann...@ya...>
Cc: val...@li...
Date: Monday, April 12, 2010, 4:21 PM
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 <ann...@ya...> 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
> Val...@li...
> https://lists.sourceforge.net/lists/listinfo/valgrind-users
>
>
--
Alexander Potapenko
Software Engineer
Google Moscow
------------------------------------------------------------------------------
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
Val...@li...
https://lists.sourceforge.net/lists/listinfo/valgrind-users
|
|
From: Anna C. <ann...@ya...> - 2010-04-12 13:58:31
|
Hi,
Alex, thanks for your response. There must be something wrong with my setup, although I didn't do anything special during installation of snow leopard.
Ajit, .cpp files are not scripts (unless you use a special program like cern root), which is why u use g++ to compile it, producing a file called a.out or something similar, before u use a.out as a parameter to valgrind.
Regards,
Anna.
________________________________
From: ajit gunge <pea...@ya...>
To: Anna Ceguerra <ann...@ya...>; Alexander Potapenko <gl...@go...>
Cc: val...@li...
Sent: Mon, 12 April, 2010 10:39:10 PM
Subject: Re: [Valgrind-users] 3.5.0, macosx snow leopard, stdin
Hi,
I tried running the same code but I am getting different kind of errors.
These are the errors
valgrind --db-attach=yes --log-file=testout.txt myprogram.cpp < input.txt
myprogram.cpp: line 3: using: command not found
myprogram.cpp: line 4: syntax error near unexpected token `('
myprogram.cpp: line 4: `int main(void)'
But when I run the above program using g++ with the following steps my program gets compiled correctly.
g++ myprogram.cpp ===>No wrrors reported.
Why am I getting errors when I run the command
valgrind --db-attach=yes --log-file=testout.txt myprogram.cpp <
input.txt.I am running the above command in RHEL.
Please let me know if I am doing anything incorrect?
Thanks,
Ajit
--- On Mon, 4/12/10, Alexander Potapenko <gl...@go...> wrote:
>From: Alexander Potapenko <gl...@go...>
>Subject: Re: [Valgrind-users] 3.5.0, macosx snow leopard, stdin
>To: "Anna Ceguerra" <ann...@ya...>
>Cc: val...@li...
>Date: Monday, April 12, 2010, 4:21 PM
>
>
>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 <ann...@ya...> 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
>> Val...@li...
>> https://lists.sourceforge.net/lists/listinfo/valgrind-users
>>
>>
>
>
>
>--
>Alexander Potapenko
>Software Engineer
>Google Moscow
>
>------------------------------------------------------------------------------
>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
>Val...@li...
>https://lists.sourceforge.net/lists/listinfo/valgrind-users
>
|
|
From: Alexander P. <gl...@go...> - 2010-04-13 09:24:45
|
Anna, are you really running Snow Leopard (10.6)? If yes, then Valgrind may not work out of the box at all. Please refer to https://bugs.kde.org/show_bug.cgi?id=205241 for more information. Alex > Alex, thanks for your response. There must be something wrong with my > setup, although I didn't do anything special during installation of snow > leopard. > > |
|
From: Anna C. <ann...@ya...> - 2010-04-13 10:18:37
|
Hi Alex, Yes I'm running 10.6.3. Is there any way to install the patch without building it from scratch? Thanks, Anna. Anna, are you really running Snow Leopard (10.6)? If yes, then Valgrind may not work out of the box at all. Please refer to https://bugs.kde.org/show_bug.cgi?id=205241 for more information. Alex >Alex, thanks for your response. There must be something wrong with my setup, although I didn't do anything special during installation of snow leopard. > > |
|
From: Alexander P. <gl...@go...> - 2010-04-13 10:39:27
|
I suppose there isn't. Your experience of testing Greg Parker's patch may be helpful, so if you happen to find any problems with it, please update the bug issue. On Tue, Apr 13, 2010 at 2:18 PM, Anna Ceguerra <ann...@ya...> wrote: > Hi Alex, > Yes I'm running 10.6.3. > Is there any way to install the patch without building it from scratch? > Thanks, > Anna. > Anna, are you really running Snow Leopard (10.6)? > If yes, then Valgrind may not work out of the box at all. > Please refer to https://bugs.kde.org/show_bug.cgi?id=205241 for more > information. > Alex >> >> Alex, thanks for your response. There must be something wrong with my >> setup, although I didn't do anything special during installation of snow >> leopard. > > -- Alexander Potapenko Software Engineer Google Moscow |