User forums > Help
Debugger finished with status 1
cooboo:
Whenever I try to open the cpu registers window, the window opens for a second, empty, then closes and debugger ends with the code finished with status one. The debugger log shows the cpu registers at least.
The same thing happens if I type info reg into the debugger. Similar thing happens if I type info frame into the debugger (only without being displayed the register info of course).
What does this? This is a bug right?
BlueHazzard:
Operating system?
Codeblocks version?
Debugger Version?
Can you enable full debugger logging and post the log here?
Settings->Debugger->Common->Full (Debug) Log
cooboo:
Windows 10
codeblocks 20.03 (I got the self extracting setup that is bundled with mingw)
GDB 8.1
Log is below:
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\Users\Admin\Desktop\Coding\C\test\test\
Adding source dir: C:\Users\Admin\Desktop\Coding\C\test\test\
Adding file: C:\Users\Admin\Desktop\Coding\C\test\test\bin\Debug\test.exe
Changing directory to: C:/Users/Admin/Desktop/Coding/C/test/test/.
Set variable: PATH=.;C:\Program Files\CodeBlocks\MinGW\bin;C:\Program Files\CodeBlocks\MinGW;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\ImageMagick-7.0.8-Q16;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Users\Admin\AppData\Local\Microsoft\WindowsApps;C:\Users\Admin\AppData\Local\Programs\Python\Python37\Scripts
[debug]Command-line: C:\Program Files\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname -quiet -args C:/Users/Admin/Desktop/Coding/C/test/test/bin/Debug/test.exe
[debug]Working dir : C:\Users\Admin\Desktop\Coding\C\test\test
Starting debugger: C:\Program Files\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname -quiet -args C:/Users/Admin/Desktop/Coding/C/test/test/bin/Debug/test.exe
done
[debug]> set prompt >>>>>>cb_gdb:
Setting breakpoints
[debug]Reading symbols from C:/Users/Admin/Desktop/Coding/C/test/test/bin/Debug/test.exe...done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 8.1
[debug]Copyright (C) 2018 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 "x86_64-w64-mingw32".
[debug]Type "show configuration" for configuration details.
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]Find the GDB manual and other documentation resources online at:
[debug]<http://www.gnu.org/software/gdb/documentation/>.
[debug]For help, type "help".
[debug]Type "apropos word" to search for commands related to "word".
[debug]>>>>>>cb_gdb:
[debug]> set confirm off
Debugger name and version: GNU gdb (GDB) 8.1
[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 200
[debug]>>>>>>cb_gdb:
[debug]> set new-console on
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor intel
[debug]>>>>>>cb_gdb:
[debug]> directory C:/Users/Admin/Desktop/Coding/C/test/test/
[debug]Source directories searched: C:/Users/Admin/Desktop/Coding/C/test/test;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> break "C:/Users/Admin/Desktop/Coding/C/test/test/test.c:3"
[debug]Breakpoint 1 at 0x40155b: file C:\Users\Admin\Desktop\Coding\C\test\test\test.c, line 3.
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: C:\Users\Admin\Desktop\Coding\C\test\test\bin\Debug\test.exe
Child process PID: 6688
[debug][New Thread 6688.0x6d0]
[debug][New Thread 6688.0x1b5c]
[debug]Thread 1 hit Breakpoint 1, read_req () at C:\Users\Admin\Desktop\Coding\C\test\test\test.c:14
[debug]C:\Users\Admin\Desktop\Coding\C\test\test\test.c:14:196:beg:0x40155b
[debug]>>>>>>cb_gdb:
At C:\Users\Admin\Desktop\Coding\C\test\test\test.c:14
[debug]> if 1
disassemble 0x40155b
info frame
end
[debug] >
[debug] > >Dump of assembler code for function read_req:
[debug] 0x0000000000401550 <+0>: push rbp
[debug] 0x0000000000401551 <+1>: mov rbp,rsp
[debug] 0x0000000000401554 <+4>: sub rsp,0xb0
[debug]=> 0x000000000040155b <+11>: lea rcx,[rip+0x2a9e] # 0x404000
[debug] 0x0000000000401562 <+18>: call 0x402ab0 <printf>
[debug] 0x0000000000401567 <+23>: lea rax,[rbp-0x90]
[debug] 0x000000000040156e <+30>: mov rcx,rax
[debug] 0x0000000000401571 <+33>: call 0x402ac8 <gets>
[debug] 0x0000000000401576 <+38>: lea rax,[rbp-0x90]
[debug] 0x000000000040157d <+45>: mov rcx,rax
[debug] 0x0000000000401580 <+48>: call 0x402af8 <atoi>
[debug] 0x0000000000401585 <+53>: mov DWORD PTR [rbp-0x4],eax
[debug] 0x0000000000401588 <+56>: mov eax,DWORD PTR [rbp-0x4]
[debug] 0x000000000040158b <+59>: add rsp,0xb0
[debug] 0x0000000000401592 <+66>: pop rbp
[debug] 0x0000000000401593 <+67>: ret
[debug]End of assembler dump.
Debugger finished with status 1
oBFusCATed:
gdb seems to be crashing :(
Can you reproduce the problem in a command line window outside of codeblocks?
cooboo:
I'm far from an expert on this, could you give me some guidance as to how I would do this same debugging via command prompt? I can open GDB.exe but I'm not really sure how to proceed..
edit: ok so I opened gdb via C:\Program Files\CodeBlocks\MinGW\bin and got a command prompt, the changed directories to where my test project was, set the breakpoint, ran the program and all good so far, then hit info reg and it momentarily listed the reg info before closing the prompt.
I assume this is what you meant to try? It seems to suffer the same problem.
Navigation
[0] Message Index
[#] Next page
Go to full version