Re: Segmentation fault : Comment chercher?

Top Page

Reply to this message
Author: anne aublanc
Date:  
To: guilde
Subject: Re: Segmentation fault : Comment chercher?

----- Original Message -----
From: "Francois-Xavier Kowalski" <francois-xavier.kowalski@???>
To: <guilde@???>
Sent: Thursday, February 27, 2003 10:34 PM
Subject: Re: Segmentation fault : Comment chercher?


| Frédéric BOITEUX wrote:

|
| > Si tu n'as pas de « core », lance gdb sans celui-ci :
| >
| >gdb faxgetty
| >...
| >(gdb) run
| > Starting program: /usr/sbin/faxgetty
| >
| > Program exited with code 0377.
| >

|
| la tu as peu de chance d'avoir un core... :-)

|
| Le programme est sorti en erreur, mais sans se faire descendre.

|
| >et là, tu fais juste « bt » pour voir où il en était quand il a planté :
| >
| >(gdb) bt
| >...
| >


avec "set args ttyS0" avant le run, cela fonctionne mieux.

j'avoue, on m'a aidé pour trouver la façon de mettre les paramètres du pgm
avec gdb
On m'a surtout donné la cde : "help"
c'est à dire
On lance "gdb nom_pgm"
(gdb) help
List of classes of commands:

aliases -- Aliases of other commands
breakpoints -- Making program stop at certain points
data -- Examining data
files -- Specifying and examining files
internals -- Maintenance commands
obscure -- Obscure features
running -- Running the program
....
(gdb) help running
Running the program.

List of commands:

attach -- Attach to a process or file outside of GDB
continue -- Continue program being debugged
detach -- Detach a process or file previously attached
finish -- Execute until selected stack frame returns
....

Et voilà!

Maintenant, que j'ai les lignes qui plantent... y-a plus qu'à!

merci à tous

anne