2016-10-11 1 views
0

J'ai récemment commencé à programmer dans DEV C++ et je suis tombé sur un problème que la recherche dans Googleshere n'a pas encore été utile.GDB dans DEV C++ stalle sur cout

Dans le code suivant, GDB "se bloque" lorsqu'il atteint la ligne 5, std::cout << "Hello" << std::endl;.

#include <iostream> 
int main() 
{ 
    int tree = 9; 
    std::cout << "Hello" << std::endl; 
    tree = 10; 
    return 0; 
} 

Le programme compile et fonctionne très bien, mais quand il se marcher à travers toujours coincé ici et ni « ligne suivante » ou « Continuer » semblent fonctionner.

Voici quelques sortie de la fenêtre GDB:

Starting program: C:\XXX\XXX\XXX\XXX\breakGDB.exe 
[New Thread 7300.0x2028] 

->->new-thread 
[New Thread 7300.0x2638] 

->->new-thread 

->->starting 

->->breakpoints-invalid 

->->frames-invalid 

->->breakpoint 1 

Breakpoint 1, 
->->frame-begin 0 0x40153d 

->->frame-function-name 
main 
->->frame-args 
() 
->->frame-source-begin 
at 
->->frame-source-file 
hello.cpp 
->->frame-source-file-end 
: 
->->frame-source-line 
5 
->->frame-source-end 


->->source C:\XXX\XXX\XXX\XXX\hello.cpp:5:38:beg:0x40153d 

->->frame-end 

->->stopped 

->->pre-prompt 
(gdb) 
->->prompt 

->->post-prompt 

->->frames-invalid 

->->starting 

->->frame-begin 0 0x44d2f0 

->->frame-address 
0x000000000044d2f0 
->->frame-address-end 
in 
->->frame-function-name 
std::ostream::operator<<(std::ostream& (*)(std::ostream&)) 
->->frame-args 
() 

->->frame-end 

->->stopped 

->->pre-prompt 
(gdb) 
->->prompt 

->->post-prompt 
Single stepping until exit from function _ZNSolsEPFRSoS_E, 
which has no line number information. 

->->frames-invalid 

->->starting 

->->frame-begin 0 0x46cf10 

->->frame-address 
0x000000000046cf10 
->->frame-address-end 
in 
->->frame-function-name 
std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&) 
->->frame-args 
() 

->->frame-end 

->->stopped 

->->pre-prompt 
(gdb) 
->->prompt 

Je suis tout à fait nouveau pour GDB. Est-ce une caractéristique de GDB? Est-ce que j'ai un mauvais réglage? Que se passe t-il ici?

J'ai les doigts croisés ce n'est pas une erreur stupide de ma part.

Répondre

-1

J'ai rencontré le même problème et je l'ai "résolu" en basculant l'ensemble du compilateur de débogage 64 bits à débogage 32 bits.

Encore besoin d'une solution pour 64 bits.

// Dev-Cpp 5.11 TDM-GCC x64 4.9.2 Portable