Programming :: GCOV : Produces Empty .c.gcov Files
Nov 29, 2010
I am trying to use gcov on a library (.so) with GCC 4.5. When I compile it does produce the .gcno file. When I run the test it does produce .gcda files corresponding to the library source files. But when I run gcov on source file it produces an empty .c.gcov file.
View 8 Replies
ADVERTISEMENT
Jun 1, 2010
I have this treacherous program in C which uses external static libraries (extern etc), and want to do a coverage test of it. The libraries are written in fortran. I compile like this Code: gcc -fprofile-arcs -ftest-coverage -o main main.c library.o I run my nice program like that
Code: ./main Then I do the magic stuff
Code: gcov main.c library.f
Ok 98% of the lines were used in main.c, and I get a file with line counts and all that. Great! But, I need to know the coverage in my library too! It says 0.0% and that's impossible. So what can I do? I can't run it like an executable because it's a library.
And why is the terminal not accepting my copy paste? I copy some lines from my IDE, then I want to paste it into the terminal (with ctrl-v of course, not some crazy local application non-standard counter-intuitive key combo made just to cause agony among honest users!), and that could've been the only problem here, but it isn't. I can't even paste with that right click menu. So, if I was crazy before, I went nuts after that. My great "solution" was to paste it into the firefox URL field (not the search field ) and then copy that and paste it into the terminal. Is that common practice for you all while dealing with that unburied DOS-window?
View 1 Replies
View Related
Mar 3, 2011
I have an executable with input options, like so:
Code:
./executable -n 42 -s 42
I've added gcov to the makefiles (compiling with --coverage, -fprofile-arcs, and -ftest-coverage, and linking with -lgcov). It builds fine and creates executable.gcno.
When I try to run gcov, gcov things the options belong to it:
Code:
$ gcov ./executable -n 42 -s 42
gcov: invalid option -- 's'
Usage: gcov [OPTION]... SOURCEFILE...
When I use quotes this happens:
Code:
$ gcov './executable -n 42 -s 42'
executable -n 42 -s 42.gcno:cannot open graph file
The command line options must remain. How can I get gcov to generate the same .gcno file it later looks for?
View 2 Replies
View Related
Jun 22, 2010
I am working on a little project in python. i have produced this prototype
Code:
#!/usr/bin/python
# -*- coding: iso-8859-1 -*-
#DocC documentation prototype
[Code].....
View 2 Replies
View Related
Aug 13, 2010
I'm learning c but then when i tried looping as i follow a tutorial, the numbers are wierd that it seems not right..
This is the example.
Quote:
When i run it, it outputs this.
Quote:
why?
View 2 Replies
View Related
Sep 23, 2010
How can I list (using ls) all files that are not empty (size > 0) using linux?
View 7 Replies
View Related
Jun 17, 2010
I am using embedded Linux. File open is successful. The file has all the permissions. It is present in current directory too. The size is about 27KB. But s.st_size says it is zero.
inputFileName = "abc.mp3";
FILE* inFile = NULL;
inFile = fopen(inputFileName, "r+b");
[code]...
View 2 Replies
View Related
Dec 5, 2009
I'm using rmdir(), and everything goes ok if the directory is empty, ?how can I remove the entire tree when i have other files or directories in the folder that I want to delete?I've read about using "system(rm....)" but i REALLY want to do this without it, is it possible?
View 4 Replies
View Related
Apr 26, 2010
I want to check if a MySQL db query will return an empty result - I first do this:
$query="SELECT * from <whatever" ;
$result=mysql_query($query) ;
$row=mysql_fetch_row($result) ;
Now how do I check if $row is empty or not? Will $row="" do the trick?
View 2 Replies
View Related
Apr 12, 2011
Greetings EveryOne
how to check if buffer is empty in c?
View 14 Replies
View Related
May 4, 2010
I tried to find out how awk works with multiline strings. I found this. I hope it will be useful for somebody. 1. I know that awk can searches simple patterns like '/^one/'
Code:
s="one
two
three"
echo $s | awk '/^one/'
2. I know that "Awk can handle multiline records by specifying the field separator to be a newline and set the record separator to an empty string." I've found it here
[Code]....
View 9 Replies
View Related
Mar 26, 2011
Using awk I pull the first field of a random line from my datafile.myvar1=`awk -F" " 'NR=='$randline' {printf "%s", $1}' myfileThis works fine. The problem is there will be empty lines at the end of the file. Rather than using awkto filter out blank lines I would like to figure this out first.So I test $myvar1 for a blank string after setting $randline to one that I know is blank:test -z "$myvar1" && echo "true" || echo "false"But, this returns "false"? So the string is not zero length. Why? It's a tab-separated file. Is awk storing the tab with the $1 field or something.This is where I get headache. I try to echo my variable to see what it looks like.
echo "$myvar1"
outputs: nothing
echo "My variable is [$myvar1]"
outputs: [y variable is [
Why is the closing bracket at the beginning? What character could be stored in $myvar1 that would do such a thing and how did it get there?
View 7 Replies
View Related
May 19, 2011
The script produces 2 empty lines and I don't know why.
View 1 Replies
View Related
Nov 28, 2008
To do this, can I do this?:
if (@ary = ""),
or is something more needed?
View 4 Replies
View Related
Apr 27, 2010
Let say I would like to check /etc/profile whether defined umask 022
umaskcheck=$(What to defined here?)
if [ What to define here? ]
then
[code]....
View 2 Replies
View Related
Dec 27, 2010
I've using RedHat/Fedora for years now, and every now and then I encounter the following situation :
I open a folder and it's empty. The folder was containing files and I'm 100% sure I didn't deleted them myself. Each time the folder is deep inside the hierarchy and is among other untouched folders. Sometimes it's a folder I never use, sometimes it's a folder I use almost everyday. The missing content is not large (a few regular files).
I'm currently running F13 but I've seen this behavior before on previous versions. This is kind of scary all my work is there and my backups are also done on a a linux backup server.
I'm puzzled, I cannot see any specificities to these folders, I had no crash or cold reboot, nothing I see can explain that. Could it be related to ext3?
View 2 Replies
View Related
Feb 14, 2010
Apologies if this has been asked before, which I'm sure it has from what I see googling around, but I cant understand this fully.
I have a piles of files in the .Trash-1000 folder on my flash drive that I want to delete. I can see them if I go in as root using the command line and entering "gksu nautilus" but it still wont allow me to delete them.
View 9 Replies
View Related
Jun 24, 2010
Imported an Excel file into OO.o Calc. EVerything is fine except the comments are all blank. It knows that comments should be there, but they're all empty. how to recover the contents?
View 2 Replies
View Related
May 20, 2010
I was trying to list sudo users in a Linux Machine,
[root@redhat ~]# grep -v -E '^#' /etc/sudoers
root ALL=(ALL) ALL
%work ALL=(ALL) ALL
%dilipvp ALL=(ALL) ALL
where work is a group and dilipvp is user. Can you help me in creating a better script which can list the members of the group work as well. and why I am getting empty space in between.
View 6 Replies
View Related
Feb 2, 2010
For a month or so now, I have been enabling ssh and opening port 22. I cron'ed the start and stop commands to leave them open only a few hours a day. After a bit, I checked my logs to find that some IP or another was attempting to brute force my root account.
I took little real threat by the offense.
(1) my system does not allow root to login and
(2) it would cut them off sooner than later when my system issued the stop command.
fast forward
Today I log in to find that all of my log files, as viewed from the gnome log file viewer, were empty of entries from about noon yesterday and prior.
Though I haven't noticed anything at all out of the ordinary with my system, I would like to get more opinions on the matter. Would there be any conceivable way that this was an automatic system routine, a clean up action of something? Additionally, if I was indeed the victim of a hack, what can I do to further protect my system (keeping in mind that I do want to access my system via ssh from time to time)?
View 4 Replies
View Related
May 24, 2010
I don't know whether this is a bug or feature. But I find the fact that the Trash in Gnome doesn't delete trashinfo files a security liability.
I found in ./local/share/Trash/info thousands of .trashinfo files named exactly like the files deleted and each one contains the date of deletion.
I thought when I empty the trash bin every record of the files were removed. I understand that there are forensic ways to recover data and rm isn't very secure with journaled file systems, but forensic recovery isn't 100% and if the disk is written over several times the data is gone.
Here you have a permanent list of all the files you've deleted, without you knowing and the dates of deletion. IMO that's too much information.
Update: Weird after removing the files manually and then trying to delete files again using the trash I found no .trashinfo files, this time. So they were probably leftover files, but they didn't have a different owner/permission. Could this have been an issue and now fixed? (running Lucid)
View 1 Replies
View Related
Aug 28, 2010
I mount /home on a logical partition. Files and directories that I trash from here go nicely into the recycle bin, and I can right click on it and choose "Empty Trash" with no problem. Files off of the root directory in directories that I "own" (i.e. /mydir/*) do not play as nicely. I went ahead and followed instructions from another post, namely:
Code:
sudo mkdir /.Trash
sudo chmod 1777 /.Trash
And after trashing some files from /mydir, there is indeed a subdirectory with my uid (1000) and files that I trash from /mydir are going in there. However, the recycle bin on my desktop remains empty, and the only method I have for deleting said files is by deleting them from the /.Trash/1000 folders through the command line. So my question is: Is there anyway that I can trash files from /mydir, see them appear on the desktop recycle bin, and empty the trash without the need to rm them directly through the command line? Not sure if it will help, but here is my fstab:
Code:
# / was on /dev/sda1 during installation
UUID=4129f389-92be-459e-8bbc-928c1440f718 / ext4 errors=remount-ro 0 1
# /home was on /dev/sda6 during installation
UUID=6a30914d-04a3-4b03-85bd-2bf16a68a41a /home ext4 defaults 0 2
# swap was on /dev/sda5 during installation
UUID=f388cf04-bbd6-4bf9-9d69-0778b0f158fd none swap sw 0 0
View 7 Replies
View Related
Sep 27, 2010
I've been getting this error message:"The configuration defaults for GNOME Power Manager have not been installed correctly. Please contact your computer administrator."a few times, and it turns out to be because of low disk space. No worry, I empty the trash uninstall unneeded programs and clean out the downloads folder that filled up my disk. And all is ok. But not this time.Since I can't use X, I delete stuff from the terminal, and also make sure to clean out the .Trash in both /home and /root. But still the disk is full. I delete more stuff, but it doesn't even seem to go to .Trash. It disappears, but no more disk space.
View 8 Replies
View Related
Apr 26, 2011
Using Fedora 14 with Gnome 2.3 Desktop utilizing Compiz and Emerald theme manager. When I empty the trash, the icon is still the FULL Trash icon. I tried using different Emerald Themes, and different Icon sets, but still the Trash Icon stays full. I checked the trash folder in $HOME/.local/share/trash and found nothing, no hidden files.
View 3 Replies
View Related
Jun 25, 2010
I have an Ubuntu server in which a file is dumped every hour and a new file for the next hour and the process continues. If there is any problem due to which the creation of file stops then empty files are created every minute till the process is killed & started again. I need help to make a shell script to check if the empty files are being created and then kill the process and start it again.It would be a great help if anyone can help me regarding this.
View 9 Replies
View Related
Mar 27, 2010
chroot in two mini distros (Tiny Core and SliTaz): chroot jail appears 'blind'. Chroot can't find any files in the jail and exit with error code. Example (ugly):
Code:
# mkdir /mnt/test
# mkdir /mnt/test/bin
# mkdir /mnt/test/dev
# mkdir /mnt/test/proc
# mkdir /mnt/test/lib
# mount /dev/hdb1 /mnt/test
# mount -t proc none /mnt/test/proc
[Code]...
chroot: cannot execute /bin/bash: No such file or directory Where is the problem?
View 4 Replies
View Related
Jan 28, 2010
I cannot get exim4 to actually deliver any "local delivery only; not on a network".But whatever I do in the config, all mail gets frozen with entries in the log file like:"root@empty R=nonlocal: Mailing to remote domains not supported"Maybe the problem is that there is no fqdn for the computer (and will never be). How can I enable local mail delivery?
View 14 Replies
View Related
Feb 1, 2011
A string can assume the following valid values:"(a, b)" "(a)" "(b)"how I can express this disallowing empty brackets "()"? (I am using Python.)
View 6 Replies
View Related
Feb 3, 2010
I have an Asus G51 laptop and for some reason the vertical bar/backslash button produces the greater than/less than symbol (<<>>) instead of the vertical bar. I was wondering what the command is for changing a character that the key produces.
View 3 Replies
View Related
Jul 5, 2011
With this I may remove the last emtpy char which is not visible, coming from net, windows, ...
Code:
echo "$mystringwindowsorotherwithemptylastchar" |sed s/.$//
However if there are not then it makes a problem and delete effectively an existing char.
Code:
echo "klklj" |sed s/.$//
klkl
Anyone would have a solution for SH?
View 2 Replies
View Related