Bug #1807

Debugging close the debuggable process (Standard - GDB interface)

Added by Zbigniew Rebacz almost 3 years ago. Updated almost 3 years ago.

Status:ApprovedStart date:11/08/2017
Priority:UrgentDue date:
Assignee:Zbigniew Rebacz% Done:

0%

Category:IDESpent time:-
Target version:Release 2017.2

Description

The debugger quality is bad and it should be improved. We can not tolerate that it close the application when breakpoint is hit multiple times.

1. Open ide project and set breakpoint in following code (ide/EditorTabBar.cpp):

void Ide::FileSelected()
{
    if(IsNull(editfile))
        return;

    tabs.SetAddFile(editfile); // Break point here!!
}

2. Start debugging ide and click on any file tab.
3. Continue in debug
4. Continue in debug

After the second continue ide stop debugging. This ruin the debugging experience, so much.

History

#1 Updated by Zbigniew Rebacz almost 3 years ago

  • Description updated (diff)

#2 Updated by Miroslav Fidler almost 3 years ago

Please check with verbose mode active. That should display GDB communication protocol.

Alternatively, check with 'raw' GDB (from commandline).

It is not unlikely that the problem is in GDB - if true, there is very little we can do about that...

#3 Updated by Miroslav Fidler almost 3 years ago

  • Assignee changed from Miroslav Fidler to Zbigniew Rebacz

#4 Updated by Zbigniew Rebacz almost 3 years ago

GDB output:

OK. (0:32.76)
gdb /home/klugier/.upp/_out/uppsrc/GCC.Debug.Debug_Full.Gui.Shared/ide
set prompt <u++dbg-q98klwr835f427>
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying" 
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/klugier/.upp/_out/uppsrc/GCC.Debug.Debug_Full.Gui.Shared/ide...done.
(gdb) 
set disassembly-flavor intel

set exec-done-display off

set annotate 1

set height 0

set width 0

set confirm off

set print asm-demangle

set print static-members off

set print vtbl off

set print repeat 0

set print null-stop

b /home/klugier/upp/uppsrc/ide/EditorTabBar.cpp:141 if 1
Breakpoint 1 at 0x445f04: file /home/klugier/upp/uppsrc/ide/EditorTabBar.cpp, line 141.

run
Starting program: /home/klugier/.upp/_out/uppsrc/GCC.Debug.Debug_Full.Gui.Shared/ide 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffec0de700 (LWP 4809)]
[New Thread 0x7fffeb8dd700 (LWP 4810)]
[New Thread 0x7fffeb0dc700 (LWP 4811)]
[New Thread 0x7fffea8db700 (LWP 4812)]
[New Thread 0x7fffea0da700 (LWP 4813)]
[New Thread 0x7fffe98d9700 (LWP 4814)]

Thread 1 "ide" hit Breakpoint 1, Ide::FileSelected (this=0x7ffffffc2d20) at /home/klugier/upp/uppsrc/ide/EditorTabBar.cpp:141
/home/klugier/upp/uppsrc/ide/EditorTabBar.cpp:141:2341:beg:0x445f04

disas
frame
#0  Ide::FileSelected (this=0x7ffffffc2d20) at /home/klugier/upp/uppsrc/ide/EditorTabBar.cpp:141
/home/klugier/upp/uppsrc/ide/EditorTabBar.cpp:141:2341:beg:0x445f04

info threads
print if
A syntax error in expression, near `if'.

print IsNull
$1 = {bool (const Upp::Value &)} 0x4c94ee <Upp::IsNull(Upp::Value const&)>

print editfile
$2 = {<Upp::Moveable<Upp::String, Upp::AString<Upp::String0> >> = {<Upp::AString<Upp::String0>> = {<Upp::String0> = {<Upp::Moveable<Upp::String0, Upp::EmptyClass>> = {<Upp::EmptyClass> = {<No data fields>}, <No data fields>}, {chr = "\250\254\002\347\377\177", ptr
     = 0x7fffe702aca8 "/home/klugier/upp/uppsrc/Core/CharSet.cpp", wptr = 0x7fffe702aca8, qptr = 0x7fffe702aca8, v = {44200, 59138, 32767, 0, 41, 0, 0, 3895}, w = {3875712168, 32767, 41, 255262720}, q = {140737069100200, 1096345034288005161}}, len = 41, s = 0x7fff
    e702aca8 "/home/klugier/upp/uppsrc/Core/CharSet.cpp"}, <No data fields>}, <No data fields>}, <No data fields>}

print return
No symbol "return" in current context.

print tabs
print tabs.SetAddFile
$4 = {void (EditorTabBar * const, const Upp::String &)} 0x4452f2 <EditorTabBar::SetAddFile(Upp::String const&)>

print Ide::FileSelected
Cannot reference virtual member function "FileSelected" 

print tc
$5 = 1.4616321449683623412809166386416848

print jd
No symbol "jd" in current context.

print tabs.GetTabStackLR
$6 = {int (Upp::TabBar * const, int)} 0x787a72 <Upp::TabBar::GetTabStackLR(int)>

print i
No symbol "i" in current context.

print tabs.Clear
$7 = {void (Upp::TabBar * const)} 0x78f39c <Upp::TabBar::Clear()>

print tabs.GetCount
$8 = {int (const Upp::TabBar * const)} 0x4d379c <Upp::TabBar::GetCount() const>

continue
Continuing.

Debugger terminated

#5 Updated by Zbigniew Rebacz almost 3 years ago

  • Assignee changed from Zbigniew Rebacz to Miroslav Fidler

#6 Updated by Zbigniew Rebacz almost 3 years ago

The second GDB interface crash ide completely :(

#7 Updated by Miroslav Fidler almost 3 years ago

  • Status changed from New to Ready for QA
  • Assignee changed from Miroslav Fidler to Zbigniew Rebacz

Hopefully fixed

#8 Updated by Zbigniew Rebacz almost 3 years ago

  • Status changed from Ready for QA to Approved

Also available in: Atom PDF