Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams printf("Enter two integers: "); // Two integers entered by user is stored using scanf() function scanf("%d %d", &firstNumber, &secondNumber); // sum of two numbers in stored in variable sumOfTwoNumbers sumOfTwoNumbers = firstNumber + secondNumber; // Displays sum printf("%d + %d = %d", firstNumber, secondNumber, sumOfTwoNumbers); return 0;

Here are debugger logs (as described here ):

1show version
2show debug-file-directory
3set print object on
4set breakpoint pending on
5set print elements 10000
6set unwindonsignal on
7set width 0
8set height 0
9set substitute-path C:/work/build/qt5_workdir/w/s C:/msys64/mingw32/qt5-static
10set substitute-path Q:/qt5_workdir/w/s C:/msys64/mingw32/qt5-static
11set substitute-path c:/Users/qt/work/install C:/msys64/mingw32/qt5-static
12set substitute-path c:/users/qt/work/qt C:/msys64/mingw32/qt5-static
13python sys.path.insert(1, 'C:/msys64/mingw64/share/qtcreator/debugger/')
14python sys.path.append('C:/msys64/mingw64/bin/data-directory/python')
15python from gdbbridge import *
16python theDumper.loadDumpers({"token":16})
17-interpreter-exec console "set target-async off"
18-break-insert  -f "\"main.c\":12"
19attach 7444
20-exec-continue
21importPlainDumpers off
22-thread-info
23python theDumper.fetchStack({"limit":20,"nativemixed":0,"token":23})
24set disassembly-flavor att
25-interpreter-exec console "disassemble /rm 0x8ddf8"
26-stack-select-frame 0
27python theDumper.fetchVariables({"autoderef":1,"context":"","displaystringlimit":"100","dyntype":1,"expanded":["watch","return","inspect","local"],"fancy":1,"formats":{},"nativemixed":0,"partialvar":"","passexceptions":0,"qobjectnames":1,"resultvarname":"","stringcutoff":"10000","token":27,"typeformats":{},"watchers":[]})
28-interpreter-exec console "disassemble /rm 0x8dde4,0x8de5c"
<Rebuild Watchmodel 1 @ 12:59:48.782 >

(exceeded max char limit, thats why I am posting at pastebin)

https://pastebin.com/rLDsWd9N

When I try to debug code and when there is breakpoint I get a window:

The inferior stopped because it received a signal from the operating system.
Signal name: ?
Signal meaning: Unknown signal

Screenshot:

Also, I get issue:

:-1: error: An exception was triggered: 
Exception at 0x4015f6, code: 0x4000001f: Win32 x86 emulation subsystem breakpoint hit, flags=0x0.

Screenshot:

Also some screenshot:

Building and running code gives me no error. I have read this but I have no antivirus other than Windows Defender and I disabled it real-time protection. I use Windows 8.1

I also use QT, mingw and gdb from msys2.

Question: What is the problem and how to solve it?

Please post all relevant error messages as text. Pictures of exceptions are insufficient. – fuz May 28, 2018 at 17:00 @fuzI have added debugger logs. Is there any information that you think I can post as text to improve my question? – vasili111 May 28, 2018 at 17:07 All the information is important, especially the exact text of the error messages so other people can search for them. Please do not post Paste Bin links, doing so is frowned upon on Stack Overflow. Instead, post the debug logs inline into your questions. – fuz May 28, 2018 at 17:14 @fuz You are right posting everything as text here will improving search. I posted first log as a text but when tried to post the second log too I exceeded max char limit. What should I do? Post error messages as text here and logs at pastebin or there is any better way? – vasili111 May 28, 2018 at 17:26 I am not sure. Try to post in your post what is most relevant, the other stuff can be left out unless requested specifically. – fuz May 28, 2018 at 21:29

I was using qtcreator 64 bit but for the project selected kit mingw-w64 32 bit. I think that difference in bitness caused error.

Now when I use qtcreator 64 bit with kit mingw-w64 64 bit, debugger works fine

I got by help from Reddit user jedwardsol:

4000001f is coming from the x86 emulation layer of 64-bit Windows. Perhaps your debugger doesn't understand it.

Try building a 64-bit program instead.

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.