Author Topic: Frame issue with the debugger plugin  (Read 20322 times)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: Frame issue with the debugger plugin
« Reply #45 on: October 04, 2015, 04:41:31 pm »
If you give me a link to it, I can start using it. Otherwise I'll just give you links to a branch on github next time.
Its somewhere in the forums or at Jens' homepage? I don't recall as I don't use it. I thought you would remember as we had that topic the one or other time already.

But nevermind - the new patches work fine. I guess I have to apply only one, so I took the second and will try what happens (although debugging wxWidgets apps using C::B is currently heavily broken with recent TDM release).

Do you have a particular test case to try on Windows? Or should I just debug "anything"?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11932
    • Travis build status
Re: Frame issue with the debugger plugin
« Reply #46 on: October 04, 2015, 05:11:20 pm »
"Debug anything" should probably be enough.  8)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: Frame issue with the debugger plugin
« Reply #47 on: October 04, 2015, 08:03:44 pm »
I attached svn compatible (whatever) versions. I think the problem is with the lines:
Code: [Select]
@@ -123,7 +124,7 @@ class DLLIMPORT cbStackFramewhere the svn (whatever) generated version is like:
Code: [Select]
@@ -123,7 +124,7 @@This seems to be some kind of a setting problem and is NOT related to my patching utility.
This was one issue and the second one (more bad) was that the line(s) like:
+++ src/include/cbdebugger_interfaces.h    (working copy)
...contained tabulator(s) after the file name which is invalid and makes SVN look for a file named "src/include/cbdebugger_interfaces.h    (working copy)" which obviously does not exist.

BTW: I am using "svn patch foo.patch" on the command line (svn version 1.9.1). So it maybe a SVN issue after all...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11932
    • Travis build status
Re: Frame issue with the debugger plugin
« Reply #48 on: October 04, 2015, 08:14:49 pm »
BTW: I am using "svn patch foo.patch" on the command line (svn version 1.9.1). So it maybe a SVN issue after all...
Interesting,  so there is a patch command in svn.
Can you contact svn support to see what they have to say about this problem?
Last time I've tried to apply patches generated by my script using the standalone patch tool on linux it worked without errors.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: Frame issue with the debugger plugin
« Reply #49 on: October 06, 2015, 03:16:23 pm »
Can you contact svn support to see what they have to say about this problem?
I got an answer:
The error is on your side: In the original patch there were spaces between the file name and the revision. There should have been a tab as you cannot differ between a file name that ends with a space (which is possible, indeed) and a separator.

So, this is wrong:
+++ src/include/cbdebugger_interfaces.h[1..n space](working copy)
...this is right:
+++ src/include/cbdebugger_interfaces.h[1..n TAB](working copy)
And indeed: With that minor modification the original patch applied safely.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11932
    • Travis build status
Re: Frame issue with the debugger plugin
« Reply #50 on: October 06, 2015, 07:14:44 pm »
What? Are you joking? They are failing to apply this patch because of some strange convention they've made up?
The good thing is that svn has only one direction it will follow - to join cvs in the vcs oblivion land.  ;D Hopefully this will happen in the not so distant future.

Anyway I'll look in the script and I'll try to fix it.

Edit:
Code: [Select]
Index: src/CodeBlocks_wx30-unix.cbp
===================================================================
--- src/CodeBlocks_wx30-unix.cbp    (revision 10528)
+++ src/CodeBlocks_wx30-unix.cbp    (working copy)
@@ -149,7 +149,7 @@
  <Option output="devel30/codeblocks" prefix_auto="1" extension_auto="1" />
  <Option working_dir="devel30" />
  <Option object_output=".objs30" />
- <Option type="0" />
+ <Option type="1" />
  <Option compiler="gcc" />
  <Option parameters="--debug-log --multiple-instance -ns -ni -v -p debug" />
  <Option projectLinkerOptionsRelation="2" />
@@ -507,7 +507,7 @@
  </Target>
  <Environment>
  <Variable name="WX_CFG" value="" />
- <Variable name="WX_CONFIG" value="wx-config --version=3.0" />
+ <Variable name="WX_CONFIG" value="/home/obfuscated/software/wx/bin/wx-config" />
  <Variable name="WX_SUFFIX" value="u" />
  <Variable name="WX_VERSION" value="30" />
  </Environment>
@@ -519,7 +519,7 @@
  </VirtualTargets>
  <Compiler>
  <Add option="-Wall" />
- <Add option="-ansi" />
+ <Add option="-std=c++11" />
  <Add option="$(#CB_RELEASE_TYPE)" />
  <Add option="-fmessage-length=0" />
  <Add option="-fexceptions" />

Does this apply out of the box?
« Last Edit: October 06, 2015, 07:18:53 pm by oBFusCATed »
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11932
    • Travis build status
Re: Frame issue with the debugger plugin
« Reply #51 on: October 17, 2015, 10:22:56 am »
Any status update? Is this patch working on your side? Should I commit it?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: Frame issue with the debugger plugin
« Reply #52 on: October 17, 2015, 12:32:44 pm »
Any status update? Is this patch working on your side? Should I commit it?
So here is what I tried:
- C::B wx28 + wx30/32 bit + wx30/64 bit build (3 in total)
- "Tester App" with some function calls and calculations
- compiled this using MinGW and MinwGW64 (TDM 5.1)
- Debugged with gdb32/gdb64 respectively (TDM 5.1)

No strange observations.

For me its fine, although I didn't realise there was an issue at all w/o the patch.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Frame issue with the debugger plugin
« Reply #53 on: October 17, 2015, 01:11:38 pm »
The original issue is limited to wx2.8 + 64bit. You can see screenshots in the very 1st post.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11932
    • Travis build status
Re: Frame issue with the debugger plugin
« Reply #54 on: October 17, 2015, 03:01:35 pm »
Scarphin have you tried the patches with your build configuration?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: Frame issue with the debugger plugin
« Reply #55 on: October 17, 2015, 04:57:20 pm »
The original issue is limited to wx2.8 + 64bit. You can see screenshots in the very 1st post.
Do you mean its w28 related, or 64 bit related? From the changes you did I would guess that this should happen on any 64 bit build - be it wx28 or wx30.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11932
    • Travis build status
Re: Frame issue with the debugger plugin
« Reply #56 on: October 17, 2015, 09:39:08 pm »
The original issue (user visible) is that some of the string to number conversion functions in wx are wrong.

The patches try to fix the more serious problem - debugging a 64bit program with 32bit codeblocks.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Frame issue with the debugger plugin
« Reply #57 on: October 17, 2015, 11:39:48 pm »
Morten: It's related to the mix of wx28 and 64-bit. The actual problem arises from a conversion function in wx28 not functioning properly when built under a 64-bit configuration. It's a known wx problem, you can find a link to the wx tracker somewhere on this thread. If I recall correctly, later wx versions (I think starting from wx29) doesn't exhibit this problem.

Obfuscated: I'm very busy nowadays, I'll test it in a couple of days hopefully.

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Frame issue with the debugger plugin
« Reply #58 on: October 19, 2015, 11:56:11 pm »
The 2nd patch (dbg.win64.support.2.002.patch) works fine displaying both the frame number and assembler addresses correctly on my wx2.8 64-bit build. If it matters, I even tested it on a 64-bit application.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11932
    • Travis build status
Re: Frame issue with the debugger plugin
« Reply #59 on: October 19, 2015, 11:58:50 pm »
Thanks. Using the patch it should always be possible to debug both 32 and 64bit apps.
I'll commit in a minute.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]