Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Splitting debugger in two - specific debugger and common GUI

<< < (118/136) > >>

Jenna:

--- Quote from: oBFusCATed on January 14, 2012, 04:17:01 pm ---This is caused by
1. cbEditor::SaveFoldState() calling cbEditor::OnEditorModified
2 which then calls debugger->EditorLinesAddedOrRemoved,
3. which shifts the breakpoints after the end of the file.

--- End quote ---

Can you please test the attached patch ?
It prevents the event-connection if the dummy editor for the fold-backup is created.
So no line-added-event is thrown for the backup editor and therefore the bp's get not shifted.

MortenMacFly:

--- Quote from: jens on January 15, 2012, 01:56:06 am ---Can you please test the attached patch ?

--- End quote ---
Works here. I think that's way better than before, please commit. ;-)

MortenMacFly:
Another one:
- Start C::B (do not have anything opened before)
- Create a console app using the wizard, select only debug target
- Once created, place a BP in the "cout << " line
- Hit The "Debug" button from the tool bar.
- For me, GDB does not run the debuggee and I cannot stop the debugger until I kill it from the task manager
--> Note: The "build before debug" is off, so there is no executable! But it should not fail like that.

The log:
[debug]Command-line: C:\Devel\GCC46TDM\bin\gdb.exe -nx -fullname  -quiet  -args 粔"冠ࠇ
[debug]Working dir : C:\DOKUME~1\Morten\Desktop\MYCon

Starting debugger: C:\Devel\GCC46TDM\bin\gdb.exe -nx -fullname  -quiet  -args 粔"冠ࠇ
done

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

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

[debug]????: No such file or directory.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.3
[debug]Copyright (C) 2011 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 "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.3

[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 debugevents on
[debug]>>>>>>cb_gdb:
[debug]> set new-console on
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]No symbol table is loaded.  Use the "file" command.
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source C:\Devel\CodeBlocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory C:/DOKUME~1/Morten/Desktop/MYCon/
[debug]>>>>>>cb_gdb:
[debug]> break "C:/Dokumente und Einstellungen/Morten/Desktop/MYCon/main.cpp:7"
[debug]No symbol table is loaded.  Use the "file" command.
[debug]Breakpoint 2 ("C:/Dokumente und Einstellungen/Morten/Desktop/MYCon/main.cpp:7) pending.
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]No executable specified, use `target exec'.
[debug]>>>>>>cb_gdb:


Notice that the strange Chinese characters "-args 粔"冠ࠇ" are really there.

oBFusCATed:
Can you try this patch and then tell me if it works:

--- Code: ---Index: src/plugins/debuggergdb/gdb_commands.h
===================================================================
--- src/plugins/debuggergdb/gdb_commands.h      (revision 7700)
+++ src/plugins/debuggergdb/gdb_commands.h      (working copy)
@@ -681,9 +681,9 @@
             const wxArrayString &lines = GetArrayFromString(output, _T('\n'));
             for (size_t ii = 0; ii < lines.GetCount(); ++ii)
             {
-                if (lines[ii].StartsWith(wxT("No symbol table loaded."))
-                    || lines[ii].StartsWith(wxT("No executable file specified."))
-                    || lines[ii].StartsWith(wxT("No executable specified.")))
+                if (lines[ii].StartsWith(wxT("No symbol table loaded"))
+                    || lines[ii].StartsWith(wxT("No executable file specified"))
+                    || lines[ii].StartsWith(wxT("No executable specified")))
                 {
                     // log this and quit debugging
                     m_pDriver->Log(_("Starting the debuggee failed: ")+lines[ii]);

--- End code ---

About the Chinese characters: I don't see any on linux, but I guess something is not initialized correctly, can you try to debug it?

Jenna:

--- Quote from: MortenMacFly on January 17, 2012, 08:34:38 am ---
--- Quote from: jens on January 15, 2012, 01:56:06 am ---Can you please test the attached patch ?

--- End quote ---
Works here. I think that's way better than before, please commit. ;-)

--- End quote ---
To trunk or to debugger-branch ?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version