Dimensione: 4028
Commento:
|
Dimensione: 3561
Commento: rimossa edgy
|
Le cancellazioni sono segnalate in questo modo. | Le aggiunte sono segnalate in questo modo. |
Linea 1: | Linea 1: |
## page was renamed from Debug | |
Linea 4: | Linea 5: |
||<tablestyle="float:right; font-size: 0.9em; width:30%; background:#F1F1ED; margin: 0 0 1em 1em;" style="padding:0.5em;">'''Indice:'''[[BR]][[TableOfContents]]|| | [[Indice()]] |
Linea 6: | Linea 7: |
= Introduzione = | |
Linea 7: | Linea 9: |
This document describes how to install debug packages on Ubuntu, which will aid in providing information for bugs. | Questo documento descrive come installare pacchetti per eseguire le operazioni di ''debug'' in '''Ubuntu'''. |
Linea 9: | Linea 11: |
= Preparativi = | |
Linea 10: | Linea 13: |
== Edgy Eft 6.10 == | È necessario adeguare la propria [:SourcesList:lista] dei [:Repository:repository] in modo da poter installare gli strumenti necessari alle operazioni di debug. Aprire il file `/etc/apt/sources.list` con un [:Ufficio/EditorDiTesto:editor di testo] con i [:AmministrazioneSistema/Sudo:privilegi di amministrazione] e aggiungere le righe adatte alla versione in uso: |
Linea 12: | Linea 15: |
Use this section only if you are using Ubuntu Edgy 6.10. See the following section if you are using a prior version. 1. Add the following line to `/etc/apt/sources.list`: {{{deb http://people.ubuntu.com/~pitti/ddebs edgy main universe |
* '''Ubuntu 8.04''' «'''Hardy Heron'''»: {{{ deb http://people.ubuntu.com/~pitti/ddebs hardy main universe |
Linea 18: | Linea 19: |
2. Import Martin's public key to your keyring: {{{ |
Per importare la chiave [:Sicurezza/GnuPg:gpg] è sufficiente digitare il seguente comando in una finestra di terminale: {{{ |
Linea 23: | Linea 24: |
3. Then run {{{ |
Infine aggiornare la lista dei pacchetti con il seguente comando: {{{ |
Linea 27: | Linea 28: |
to update your package list. | |
Linea 29: | Linea 29: |
4. The debug symbol packages have the '-dbgsym' suffix attached, so to install the debug symbols for the package 'yelp', you run: {{{ |
= Installare programmi per il debugging = Per installare i pacchetti dei simboli per il debug è utile ricordarsi che tali pacchetti hanno il suffisso «-dbgsym». Ad esempio, per installare i simboli di debug per il pacchetto ''yelp'', occorre digitare il seguente comando: {{{ |
Linea 34: | Linea 36: |
a. Now you make a ["Backtrace"]. a. You can also run ["Valgrind"], if the program crashes with a "Segmentation fault" or "Bus error". a. Optionally, you may be asked to produce an ["Strace"]. |
a. Adesso è stato realizzato un [wiki:Ubuntu/Backtrace Backtrace]; a. eseguire [:Programmazione/Valgrind:Valgrind], se il programma crasha a causa di ''Segmentation fault'' o ''Bus error''; a. a scelta, potrebbe venir chiesta una wiki:Ubuntu/Strace. |
Linea 39: | Linea 41: |
=== References === | ##= Versioni di Ubuntu precedenti = |
Linea 41: | Linea 43: |
* Announcement: https://lists.ubuntu.com/archives/ubuntu-devel-announce/2006-September/000195.html | ##Questa sezione riguarda le versioni che precedono '''Ubuntu 6.10''' «'''Edgy Eft'''». |
Linea 43: | Linea 45: |
##||<tablestyle="text-align: justify; width:100%; " style="border:none;" 5%>[[Immagine(Icone/Piccole/note.png,,center)]] ||<style="padding:0.5em; border:none;"> ''Se si vuole creare un pacchetto, assicurarsi di avere la linea deb-src in `/etc/apt/sources.list`''|| | |
Linea 44: | Linea 47: |
== Feisty Fawn 7.04 == | ##Controllare se il pacchetto è disponibile per la versione di debugging. Generalmente, i pacchetti di debug saranno identificati con il suffisso `-dbg`. |
Linea 46: | Linea 49: |
The steps described above for Edgy also work for Feisty, just add the following line to `/etc/apt/sources.list`: | ##Se non è disponibile, è possibile crearne uno in questo modo: |
Linea 48: | Linea 51: |
{{{deb http://people.ubuntu.com/~pitti/ddebs feisty main universe }}} |
##installare lo script seguente: {{{ ##sudo apt-get install devscripts fakeroot ##}}} |
Linea 51: | Linea 55: |
== Gutsy Gibbon 7.10 == | ##scoprire quale pacchetto appartiene al proprio programma: {{{ ##dpkg --search <program> ##}}} |
Linea 53: | Linea 59: |
The steps described above for Edgy also work for Gutsy, just add the following line to '/etc/apt/sources.list' : {{{deb http://people.ubuntu.com/~pitti/ddebs gutsy main universe }}} |
##installare le dipendenze:{{{ ##sudo apt-get build-dep <package> ##}}} |
Linea 57: | Linea 63: |
== Prior Ubuntu versions == | ##creare `.deb` per il debugging:{{{ ##export DEB_BUILD_OPTIONS="debug nostrip noopt" ##fakeroot apt-get source -b <package> ##}}} |
Linea 59: | Linea 68: |
Use this section if you are using an Ubuntu version prior to Edgy 6.10. | ##installare i necessari `.deb` (si troveranno nella cartella di lavoro, in caso di successo nella creazione): {{{ ##sudo debi <package>*.changes ##}}} |
Linea 61: | Linea 72: |
1. Check if the package has a debugging version available. In general, debugging packages will be named with a `-dbg` suffix 1. If not, you can generally* build one this way: Something to keep in mind: if you would like to create a build you're going to need to have the relevant deb-src lines in your /etc/apt/sources.list a. Install the development scripts: {{{ sudo apt-get install devscripts fakeroot }}} a. Find out to which package your program belongs to: {{{ dpkg --search <program> }}} a. Install the build-time dependencies for the package: {{{ sudo apt-get build-dep <package> }}} a. Build .debs for debugging: {{{ export DEB_BUILD_OPTIONS="debug nostrip noopt" fakeroot apt-get source -b <package> }}} a. Install the needed .debs (they will be in the current working directory if the build succeeded): {{{ sudo debi <package>*.changes }}} * Most packages support the build of debugging version in this way. If this process doesn't work for a package, please open a bug against it. == The Xorg server == The X server will by default trap its own crashes and dump a stack trace in /var/log/Xorg.0.log. However, this stack trace is modified by the signal handler itself. To get a "normal" crash, which will trigger a core dump (and ''apport'' reporting), add this to your /etc/X11/xorg.conf: {{{ |
= Xorg server = Il server X server è in grado di gestire i ''crash'' creando uno "scarico" (''dump'') lasciando la traccia in `/var/log/Xorg.0.log`. Questa traccia è modificata dallo stesso segnale responsabile. Per ottenere un "normale" crash, cioè che crei un ''core dump'' (e un resoconto tramite '''apport'''), aggiungere nel file `/etc/X11/xorg.conf` la seguente opzione: {{{ |
Linea 102: | Linea 79: |
= Ulteriori risorse = | |
Linea 103: | Linea 81: |
== Info for the BugSquad == If you're trying to `apport-retrace` a crash report from a bug that didn't happen on the same Ubuntu release as the one you're running, do the following: Say that you're running `feisty` and the crash happened on `edgy`: 0. This will create a minimal `edgy` system. {{{ sudo mkdir -p /chroots/edgy sudo debootstrap edgy /chroots/edgy/}}} 0. Now you change into this minimal `edgy` system. {{{ sudo chroot /chroot/edgy}}} 0. edit `/etc/apt/sources/list` and all the repositories you need, especially Martin's ddeb repository. 0. {{{ apt-get update; apt-get install gdb apport}}} 0. use `apport-retrace` as you're used to. |
* [https://wiki.ubuntu.com/DebuggingProgramCrash Documento originale] * Annunci: https://lists.ubuntu.com/archives/ubuntu-devel-announce/2006-September/000195.html |
Linea 120: | Linea 84: |
CategoryProgrammazione CategoryDaRevisionare |
Introduzione
Questo documento descrive come installare pacchetti per eseguire le operazioni di debug in Ubuntu.
Preparativi
È necessario adeguare la propria [:SourcesList:lista] dei [:Repository:repository] in modo da poter installare gli strumenti necessari alle operazioni di debug. Aprire il file /etc/apt/sources.list con un [:Ufficio/EditorDiTesto:editor di testo] con i [:AmministrazioneSistema/Sudo:privilegi di amministrazione] e aggiungere le righe adatte alla versione in uso:
Ubuntu 8.04 «Hardy Heron»:
deb http://people.ubuntu.com/~pitti/ddebs hardy main universe
Per importare la chiave [:Sicurezza/GnuPg:gpg] è sufficiente digitare il seguente comando in una finestra di terminale:
wget -q "http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0x0DE7276D5E0577F2" -O- | sudo apt-key add -
Infine aggiornare la lista dei pacchetti con il seguente comando:
sudo apt-get update
Installare programmi per il debugging
Per installare i pacchetti dei simboli per il debug è utile ricordarsi che tali pacchetti hanno il suffisso «-dbgsym». Ad esempio, per installare i simboli di debug per il pacchetto yelp, occorre digitare il seguente comando:
sudo apt-get install yelp-dbgsym
- Adesso è stato realizzato un [wiki:Ubuntu/Backtrace Backtrace];
eseguire [:Programmazione/Valgrind:Valgrind], se il programma crasha a causa di Segmentation fault o Bus error;
- a scelta, potrebbe venir chiesta una wiki:Ubuntu/Strace.
Xorg server
Il server X server è in grado di gestire i crash creando uno "scarico" (dump) lasciando la traccia in /var/log/Xorg.0.log. Questa traccia è modificata dallo stesso segnale responsabile. Per ottenere un "normale" crash, cioè che crei un core dump (e un resoconto tramite apport), aggiungere nel file /etc/X11/xorg.conf la seguente opzione:
Section "ServerFlags" Option "NoTrapSignals" "true" EndSection
Ulteriori risorse
[https://wiki.ubuntu.com/DebuggingProgramCrash Documento originale]
Annunci: https://lists.ubuntu.com/archives/ubuntu-devel-announce/2006-September/000195.html