User forums > Help

Can't abort the debuger

<< < (4/5) > >>

Fik:

How do you even use a code tag?

I have no clue man, my program is the Hello World example

#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("Hello world!\n");
    return 0;
}

Thats all I have.
This program is definitely not beginner friendly, i might just end up using microsoft visual studio

oBFusCATed:

--- Quote from: Fik on March 08, 2014, 06:03:14 pm ---
How do you even use a code tag?

--- End quote ---
Press the # button in the forum's interface.



--- Quote from: Fik on March 08, 2014, 06:03:14 pm ---I have no clue man, my program is the Hello World example
...
Thats all I have.
This program is definitely not beginner friendly, i might just end up using microsoft visual studio

--- End quote ---
Hm, have you tried to put a breakpoint on the line after int main()?
Also why do you want to use a debugger?
Have you read a book about programming in c/c++?

Fik:

--- Code: ---Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\Users\Nikola\Prog. 1\fuck you\
Adding source dir: C:\Users\Nikola\Prog. 1\fuck you\
Adding file: C:\Users\Nikola\Prog. 1\fuck you\bin\Debug\fuck you.exe
Changing directory to: C:/Users/Nikola/PROG~1.1/FUCKYO~1/.
Set variable: PATH=.;C:\Program Files (x86)\CodeBlocks\MinGW\bin;C:\Program Files (x86)\CodeBlocks\MinGW;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon

[debug]Command-line: C:\Program Files (x86)\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname  -quiet  -args C:/Users/Nikola/PROG~1.1/FUCKYO~1/bin/Debug/FUCKYO~1.EXE
[debug]Working dir : C:\Users\Nikola\PROG~1.1\FUCKYO~1

Starting debugger: C:\Program Files (x86)\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname  -quiet  -args C:/Users/Nikola/PROG~1.1/FUCKYO~1/bin/Debug/FUCKYO~1.EXE
done

[debug]> set prompt >>>>>>cb_gdb:

Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints

[debug]Reading symbols from C:\Users\Nikola\PROG~1.1\FUCKYO~1\bin\Debug\FUCKYO~1.EXE...done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.5
[debug]Copyright (C) 2012 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "i686-pc-mingw32".
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]>>>>>>cb_gdb:
[debug]> set confirm off

Debugger name and version: GNU gdb (GDB) 7.5

[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 0
[debug]>>>>>>cb_gdb:
[debug]> set new-console on
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source C:\Program Files (x86)\CodeBlocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory C:/Users/Nikola/PROG~1.1/FUCKYO~1/
[debug]Source directories searched: C:/Users/Nikola/PROG~1.1/FUCKYO~1;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> break "C:/Users/Nikola/Prog. 1/fuck you/main.cpp:5"
[debug]Breakpoint 2 at 0x40134a: file C:\Users\Nikola\Prog. 1\fuck you\main.cpp, line 5.
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: C:\Users\Nikola\PROG~1.1\FUCKYO~1\bin\Debug\FUCKYO~1.EXE

--- End code ---

That is what I get when I put a break point where int main () is.

I had programming C and C++ in high school, but that was 3,4 years ago.

And about your question about the debugger. I have no clue... our professor demonstrated a few examples in code block and all he clicked on was build and run, nothing else.
All I wanna do is write codes for practice and when I press build and run, I just want to see the cmd window come out with the results, nothing else

oBFusCATed:
Then you don't need the debugger...

Do you see the cmd window?

Fik:
Yes I do, but as i told you in the first page, one cmd window flashes then disappears right afterwards, and all I'm left is with a another BLANK cmd window.
It doesn't close when I press X, instead I must press the red x (abort button) in the UI to close it, but after that the red x button is still there and the run and build buttons are greyed out...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version