PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > linux.debian.user > core dumps
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
linux.debian.user debian-user@lists.debian.org.

core dumps

Réponse
 
LinkBack Outils de la discussion
Vieux 09/03/2007, 08h20   #1
Cédric Lucantis
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut core dumps

Hi,

I'd like to know how to find which program produced a particular core dump
file, any idea?

thanks,
--
Cédric Lucantis
  Réponse avec citation
Vieux 09/03/2007, 13h00   #2
cga2000
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: core dumps

On Fri, Mar 09, 2007 at 03:16:11AM EST, Cédric Lucantis wrote:
> Hi,
>
> I'd like to know how to find which program produced a particular core dump
> file, any idea?


$ file core_file

for further analysis see also options relative to core dumps under ..

$ man gdb

Thanks,
cga


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 10/03/2007, 22h50   #3
Jhair Tocancipa Triana
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: core dumps

Cédric Lucantis writes:

> Hi,
> I'd like to know how to find which program produced a particular core dump
> file, any idea?


,----
| (debian-unstable)jtocancipa@golem:~$ ulimit -c unlimited
|
| (debian-unstable)jtocancipa@golem:~$ echo "
| #include <stdio.h>
|
| int main ()
| {
| char * foo = 0;
| *foo = 'bar';
|
| return 0;
| }
|
| " | gcc -xc -o baz -
|
| (debian-unstable)jtocancipa@golem:~$ ./baz
| Segmentation fault (core dumped)
|
| (debian-unstable)jtocancipa@golem:~$ gdb -batch -c ./core | grep -i generated
| Core was generated by `./baz'.
`----

HTH,

--
-- Jhair


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 12/03/2007, 17h30   #4
Bob McGowan
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: core dumps

Jhair Tocancipa Triana wrote:
> Cédric Lucantis writes:
>
>> Hi,
>> I'd like to know how to find which program produced a particular core dump
>> file, any idea?

>
> ,----
> | (debian-unstable)jtocancipa@golem:~$ ulimit -c unlimited
> |
> | (debian-unstable)jtocancipa@golem:~$ echo "
> | #include <stdio.h>
> |
> | int main ()
> | {
> | char * foo = 0;
> | *foo = 'bar';
> |
> | return 0;
> | }
> |
> | " | gcc -xc -o baz -
> |
> | (debian-unstable)jtocancipa@golem:~$ ./baz
> | Segmentation fault (core dumped)
> |
> | (debian-unstable)jtocancipa@golem:~$ gdb -batch -c ./core | grep -i generated
> | Core was generated by `./baz'.
> `----
>
> HTH,
>


May I suggest using the 'file' command?

$ baz
Segmentation fault (core dumped)
$ ls
baz core
$ file core
core: ELF 32-bit LSB core file Intel 80386, version 1 (SYSV),
SVR4-style, from 'baz'

  Réponse avec citation
Vieux 12/03/2007, 19h00   #5
Cédric Lucantis
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: core dumps

> >> Hi,
> >> I'd like to know how to find which program produced a particular core
> >> dump file, any idea?

> >
> > ,----
> >
> > | (debian-unstable)jtocancipa@golem:~$ ulimit -c unlimited
> > |
> > | (debian-unstable)jtocancipa@golem:~$ echo "
> > | #include <stdio.h>
> > |
> > | int main ()
> > | {
> > | char * foo = 0;
> > | *foo = 'bar';
> > |
> > | return 0;
> > | }
> > |
> > | " | gcc -xc -o baz -
> > |
> > | (debian-unstable)jtocancipa@golem:~$ ./baz
> > | Segmentation fault (core dumped)
> > |
> > | (debian-unstable)jtocancipa@golem:~$ gdb -batch -c ./core | grep -i
> > | generated Core was generated by `./baz'.
> >
> > `----
> >
> > HTH,

>
> May I suggest using the 'file' command?
>
> $ baz
> Segmentation fault (core dumped)
> $ ls
> baz core
> $ file core
> core: ELF 32-bit LSB core file Intel 80386, version 1 (SYSV),
> SVR4-style, from 'baz'


Strangely, it doesn't work on my system:

omer@pc-cedric:~$ file core
core: ELF 32-bit LSB core file Intel 80386, version 1 (SYSV), SVR4-style

But gdb -batch did the trick, thanks!

--
Cédric Lucantis
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 07h02.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,22032 seconds with 13 queries