Visualizzazione dei risultati da 1 a 9 su 9
  1. #1
    Utente di HTML.it
    Registrato dal
    Sep 2006
    Messaggi
    211

    [c++]Debugger dev-c++

    Utilizzo dev-c++ e noto molte pecche rispetto a visual studio. In primo luogo non so come si fa a risalire all'errore quando avviene un runtime-error. Il programma si blocca e dev-c++ non mi dice in quale riga si è fermato. Inoltre quando metto dei breaking point, il programma non si ferma e prosegue. Ho qualche opzione sbagliata nelle configurazioni forse?

  2. #2
    Non conosco visual studio ma forse il fatto che non ti mostri la linea, dell'errore di runtime, sta nel fatto che il dev prima compila e ( se non ci sono errori sintattici ) manda in esecuzione senza interpretare il codice....
    Neanche a me funzionano i breaking points, puoi anche scrivere un'istruzione di pausa...
    Experience is what you get when you don’t get what you want

  3. #3
    Moderatore di Programmazione L'avatar di alka
    Registrato dal
    Oct 2001
    residenza
    Reggio Emilia
    Messaggi
    24,301
    Originariamente inviato da Xaratroom
    Non conosco visual studio ma forse il fatto che non ti mostri la linea, dell'errore di runtime, sta nel fatto che il dev prima compila e ( se non ci sono errori sintattici ) manda in esecuzione senza interpretare il codice....
    La compilazione e il debugging sono fenomeni slegati: non si deve evitare la prima per poter fare la seconda.

    Non sono un utente affezionato di Visual C++, ma mi risulta che l'applicazione venga compilata anche in quel caso.
    MARCO BREVEGLIERI
    Software and Web Developer, Teacher and Consultant

    Home | Blog | Delphi Podcast | Twitch | Altro...

  4. #4
    La compilazione e il debugging sono fenomeni slegati: non si deve evitare la prima per poter fare la seconda.
    Certamente.

    Inoltre puntualizzo che il compilatore lavora in maniera differente se ( nel nostro caso ) l'opzione di debugging è attiva.

    Se hai il dev c++ 4.9.9.2 (erroneamente detto 5) l'opzione di debug è sempre attiva quindi l'ambiente ha qualche bug, se no devi modificare qualche opzione
    Experience is what you get when you don’t get what you want

  5. #5
    Non sono un utente affezionato di Visual C++, ma mi risulta che l'applicazione venga compilata anche in quel caso.
    Intendevo dire oltre alla compilazione l'interpretazione del codice...
    devo informarmi
    Experience is what you get when you don’t get what you want

  6. #6
    Utente di HTML.it
    Registrato dal
    Sep 2006
    Messaggi
    211
    Ho scaricato la versione 4.0 e va decisamente bene. Si avanza con i numeri ma si regredisce di fatto...Comunque la versione 4.0 come linguaggio e più regredita ad esempio non si puo' includere limits. Ho visto che c'è limits.h.Qualcuno sa come si possono ottenere i valori massimi e minimi da limits.h?

  7. #7
    Io uso la 5 ma ho anche la 4 ed è ottima...
    Si avanza con i numeri ma si regredisce di fatto...
    Non è vero, poi ricorda che è free

    Che vuoi dire con volori massimi o minimi?
    Experience is what you get when you don’t get what you want

  8. #8
    #ifndef _LIMITS_H_
    #define _LIMITS_H_

    /* All the headers include this file. */
    #include <_mingw.h>

    /*
    * File system limits
    *
    * TODO: NAME_MAX and OPEN_MAX are file system limits or not? Are they the
    * same as FILENAME_MAX and FOPEN_MAX from stdio.h?
    * NOTE: Apparently the actual size of PATH_MAX is 260, but a space is
    * required for the NUL. TODO: Test?
    */
    #define PATH_MAX (259)

    /*
    * Characteristics of the char data type.
    *
    * TODO: Is MB_LEN_MAX correct?
    */
    #define CHAR_BIT 8
    #define MB_LEN_MAX 2

    #define SCHAR_MIN (-128)
    #define SCHAR_MAX 127

    #define UCHAR_MAX 255

    /* TODO: Is this safe? I think it might just be testing the preprocessor,
    * not the compiler itself... */
    #if ('\x80' < 0)
    #define CHAR_MIN SCHAR_MIN
    #define CHAR_MAX SCHAR_MAX
    #else
    #define CHAR_MIN 0
    #define CHAR_MAX UCHAR_MAX
    #endif

    /*
    * Maximum and minimum values for ints.
    */
    #define INT_MAX 2147483647
    #define INT_MIN (-INT_MAX-1)

    #define UINT_MAX (2U * INT_MAX + 1)

    /*
    * Maximum and minimum values for shorts.
    */
    #define SHRT_MAX 32767
    #define SHRT_MIN (-SHRT_MAX-1)

    #define USHRT_MAX ((unsigned short) (2U * SHRT_MAX + 1))

    /*
    * Maximum and minimum values for longs and unsigned longs.
    *
    * TODO: This is not correct for Alphas, which have 64 bit longs.
    */
    #define LONG_MAX 2147483647L

    #define LONG_MIN (-LONG_MAX-1)

    #define ULONG_MAX (2UL * LONG_MAX + 1)


    /*
    * The GNU C compiler also allows 'long long int'
    */
    #if !defined(__STRICT_ANSI__) && defined(__GNUC__)

    #define LONG_LONG_MAX 9223372036854775807LL
    #define LONG_LONG_MIN (-LONG_LONG_MAX-1)

    #define ULONG_LONG_MAX (2ULL * LONG_LONG_MAX + 1)

    #endif /* Not Strict ANSI and GNU C compiler */


    #endif /* not _LIMITS_H_ */

    Non mi sembra ci siano grandi difficoltà
    Experience is what you get when you don’t get what you want

  9. #9
    Originariamente inviato da Xaratroom
    Intendevo dire oltre alla compilazione l'interpretazione del codice...
    devo informarmi
    Neanche Visual C++ interpreta il codice... le uniche funzionalità di interprete si trovano nel visualizzatore di espressioni, nulla di più.
    Amaro C++, il gusto pieno dell'undefined behavior.

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.