02-02-2011
Since you have gcc, do you have gdb? Or could you install it?
10 More Discussions You Might Find Interesting
1. Programming
sometimes for this code i get a segmentation fault for codes llike this
:
int main{
int * a= 0;
int b;
a = (int*)malloc(sizeof(int));
///some code using these variable but no freeing of a
if(a){
free(a);
a = 0;
}
return... (3 Replies)
Discussion started by: wojtyla
3 Replies
2. Programming
I have written a program which takes a directory as command line arguments and displays all the dir and files in it.
I don't know why I have a problem with the /etc directory.It displays all the directories and files untill it reaches a sub directory called peers which is in /etc/ppp/peers.the... (4 Replies)
Discussion started by: vijlak
4 Replies
3. Programming
If I do this.
Assume
struct life
{
char *nolife;
}
struct life **life;
// malloc initialization & everything
if(life->nolife == 0)
Would I get error at life->nolife if it is equal to 0.
wrong accession? (3 Replies)
Discussion started by: joey
3 Replies
4. AIX
Hello,
I am running on a AIX5.2 server with Oracle 10g and 9i. My code compiles and works fine in 32-bit mode. The
same code compiles in 64-bit and runs good. The program catches CNTRL-C signal to terminate. Only on 64-bit code
when i hit CNTRL-C, the program exits with segmentation... (0 Replies)
Discussion started by: sumesh0710
0 Replies
5. Programming
Hi,
I am having this segmentation fault not in the following program, bt. in my lab program . My lab program is horrible long so cannot post it here bt. I am using the following logic in my program which is giving the segmentation fault. Bt. if I run this sample program as it is it dosen't give... (3 Replies)
Discussion started by: mind@work
3 Replies
6. Programming
I use a binary name (ie polo) it gets some parameter , so for debugging normally i do this :
i wrote script for watchdog my app (polo) and check every second if it's not running then start it , the problem is , if my app , remain in state of segmentation fault for a while (ie 15 ... (6 Replies)
Discussion started by: pooyair
6 Replies
7. Programming
#include<stdlib.h>
#include <pthread.h>
#include "tlpi_hdr.h"
#include <stdio.h>
static volatile int glob = 0;
static struct {
pthread_t t1,t2;
} *thread;
static void * /* Loop 'arg' times incrementing 'glob' */
threadFunc(void *arg)
{
int loops = *((int *) arg); ... (1 Reply)
Discussion started by: fwrlfo
1 Replies
8. Programming
I keep getting this fault on a lot of the codes I write, I'm not exactly sure why so I'd really appreciate it if someone could explain the idea to me.
For example this code
#include <stdio.h>
main()
{
unsigned long a=0;
unsigned long b=0;
int z;
{
printf("Enter two... (2 Replies)
Discussion started by: sizzler786
2 Replies
9. Programming
Oddities with gcc, 2.95.3 for the AMIGA and 4.2.1 for MY current OSX 10.14.1...
I am creating a basic calculator for the AMIGA ADE *NIX emulator in C as it does not have one.
Below are two very condensed snippets of which I have added the results inside the each code section.
IMPORTANT!... (11 Replies)
Discussion started by: wisecracker
11 Replies
10. Programming
Apologies for any typos...
Well guys, been researching 'goto' in C and they say that you can't 'goto' labels in another function as a segmentation fault will occur.
However I have found a way to 'goto' a label in another function that is NOT main() using the asm() function.
As you know I... (14 Replies)
Discussion started by: wisecracker
14 Replies
LEARN ABOUT DEBIAN
padre::task::ppi
Padre::Task::PPI(3pm) User Contributed Perl Documentation Padre::Task::PPI(3pm)
NAME
Padre::Task::PPI - Generic PPI background processing task
SYNOPSIS
package Padre::Task::MyFancyTest;
use strict;
use base 'Padre::Task::PPI';
# Will be called after ppi-parsing:
sub process {
my $self = shift;
my $ppi = shift or return;
my $result = ...expensive_calculation_using_ppi...
$self->{result} = $result;
return;
}
1;
# elsewhere:
Padre::Task::MyFancyTest->new(
text => 'parse-this!',
)->schedule;
DESCRIPTION
This is a base class for all tasks that need to do expensive calculations using PPI. The class will setup a PPI::Document object from a
given piece of code and then call the "process_ppi" method on the task object and pass the PPI::Document as first argument.
You can either let "Padre::Task::PPI" fetch the Perl code for parsing from the current document or specify it as the ""text"" parameter to
the constructor.
Note: If you don't supply the document text and there is no currently open document to fetch it from, "new()" will simply return the empty
list instead of a "Padre::Task::PPI" object.
SEE ALSO
This class inherits from "Padre::Task" and its instances can be scheduled using "Padre::TaskManager".
The transfer of the objects to and from the worker threads is implemented with Storable.
AUTHOR
Steffen Mueller "smueller@cpan.org"
COPYRIGHT AND LICENSE
Copyright 2008-2012 The Padre development team as listed in Padre.pm.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5 itself.
perl v5.14.2 2012-06-27 Padre::Task::PPI(3pm)