(R)ex: [PLUTO-help] Programma C

(R)ex 77512746 a tiscali.it
Ven 13 Feb 2004 09:59:16 CET


De : [PLUTO-help] Programma C 


# Salve a tutti.
# Sto scrivendo un programma che scrive sulle porte (stampante...) ho provato
 a # compilarlo e fin qui nessun problema, quindi nn mi da nessun
 errore...solo # che do il comando per fare partire il programma e qui
 ottengo un mess che # dice : Segmentation fault...

Segmentation fault : rileggi quello che hai scritto.. !
Significa che fai qualche errore nelle impostazioni [I/O char]
e nell'utilizzo di inb e outb..

=========================================================
DESCRIPTION

 This family of functions is used to do low level port input and output. 
They are primarily designed for internal kernel use, but can be used from user space. 

 You compile with -O or -O2 or similar. The functions are defined as inline macros, 
and will not be substituted in without optimization enabled, causing unresolved references at link time. 

 You use ioperm(2) or alternatively iopl(2) to tell the kernel to allow the user space application 
to access the I/O ports in question. Failure to do this will cause the application to receive a segmentation fault. 
=========================================================

Con LINUX hai anche a disposizione diversi debuggers per la lettura della 'scatola nera' [core]
che viene generata eventualmente..

Userei 'ddd' oppure 'gdb' per vedere dove sbagli..

Non e' un problema irrisolvibile, e se stai preparando un laboratorio,
sono sicuro che il tuo docente ti spiegera' l'errore nella prossima lezione.
[A meno che tu non l'abbia gia' saltata.. ;o) ]


-- 
=== Manuel (R)ex Sanna
= Gnuraghe Network Administrator [ http://www.gnuraghe.it ]
===========================================================


More information about the pluto-help mailing list