Author Topic: debugger_gdbmi will not run CB  (Read 18802 times)

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: debugger_gdbmi will not run CB
« Reply #15 on: April 07, 2012, 08:21:44 pm »
Might be this one: http://code.google.com/p/qp-gcc/downloads/detail?name=GDB7.3.50.20110804-cvs.7z
I think ollydbg has built it.

Nope, no joy.

Code
[debug]notification event recieved!
[debug]output==>=thread-exited,id="1",group-id="i1"
[debug]output==>=thread-group-exited,id="i1",exit-code="01777777777777777777777"
[debug]output==>*stopped,reason="exited",exit-code="037777777777"
[debug]unparsable_output==>(gdb)
[debug]notification event recieved!
[debug]notification event recieved!
[debug]notification event recieved!
[debug]cmd==>00000000000-gdb-exit
[debug]GDBExecutor is not stopped, but command (-gdb-exit) was executed!
[debug]output==>00000000000^exit

debugger terminated!

Is there a way to find out what's causing this? Is it possible that thats a misinterpretation of a octal code or something.

[debug]output==>=thread-group-exited,id="i1",exit-code="01777777777777777777777"
[debug]output==>*stopped,reason="exited",exit-code="037777777777"

Where does it receive that return code, I'd like to trap there with command line GDB.

« Last Edit: April 07, 2012, 08:25:41 pm by Pecan »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: debugger_gdbmi will not run CB
« Reply #16 on: April 07, 2012, 08:40:52 pm »
1) I'm getting the correct SVN debbugger_gdbmi
2) CB runs when entering:
    gdb.exe -fullname  -quiet --interpreter=mi -args C:\Usr\Proj\cbDebug\trunk\src\devel\codeblocks.exe
    -exec-run
Try to add more commands to this list, so you can pinpoint the command that is breaking 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 Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: debugger_gdbmi will not run CB
« Reply #17 on: April 07, 2012, 10:13:43 pm »
1) I'm getting the correct SVN debbugger_gdbmi
2) CB runs when entering:
    gdb.exe -fullname  -quiet --interpreter=mi -args C:\Usr\Proj\cbDebug\trunk\src\devel\codeblocks.exe
    -exec-run
Try to add more commands to this list, so you can pinpoint the command that is breaking it.

I don't understand. I enter the -exec-run and it starts running, then it exits. There's no chance to enter any more commands.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: debugger_gdbmi will not run CB
« Reply #18 on: April 07, 2012, 10:19:37 pm »
There is -> you can enter some commands before you execute -exec-run like the gdb/mi plugin is doing :)
(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 Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: debugger_gdbmi will not run CB
« Reply #19 on: April 07, 2012, 10:38:28 pm »
Why is gdbmi loading dll that belong to my background/screensaver, and how do I stop it from do so. It's loading vwHook.dll which might be causing the bad return code.

Code
[debug]output==>=library-loaded,id="C:\\User\\Programs\\VirtuaWin\\vwHook.dll",target-name="C:\\User\\Programs\\VirtuaWin\\vwHook.dll",host-name="C:\\User\\Programs\\VirtuaWin\\vwHook.dll",symbols-loaded="0",thread-group="i1"
[debug]notification event recieved!
[debug]notification event recieved!
[debug]output==>=thread-exited,id="1",group-id="i1"
[debug]output==>=thread-group-exited,id="i1",exit-code="01777777777777777777777"
[debug]notification event recieved!
[debug]notification event recieved!
[debug]output==>*stopped,reason="exited",exit-code="037777777777"
[debug]notification event recieved!
[debug]cmd==>00000000000-gdb-exit
[debug]GDBExecutor is not stopped, but command (-gdb-exit) was executed!
[debug]unparsable_output==>(gdb)
[debug]output==>00000000000^exit

debugger terminated!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: debugger_gdbmi will not run CB
« Reply #20 on: April 07, 2012, 10:47:29 pm »
I guess it is in the $PATH :)
(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 Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: debugger_gdbmi will not run CB
« Reply #21 on: April 07, 2012, 11:20:38 pm »
I guess it is in the $PATH :)

No, it's not in the path, and it wasn't the problem. I uninstalled it and debugger_gdbmi still exists the same way.

At this point, I'm at a lose as to what to do. If I can't debug CB, it's a deal breaker.

I think I'll try to find a way to to get debugger_gdbmi to ignore the return codes from those library loads and see what happens.


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: debugger_gdbmi will not run CB
« Reply #22 on: April 07, 2012, 11:46:13 pm »
Can you try what happens if you comment this line: wxSetEnv(CB_LIBRARY_ENVVAR, newLibPath); in plugin.cpp?
(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 Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: debugger_gdbmi will not run CB
« Reply #23 on: April 08, 2012, 12:14:33 am »
Can you try what happens if you comment this line: wxSetEnv(CB_LIBRARY_ENVVAR, newLibPath); in plugin.cpp?

Same thing. No change.
Code
[debug]notification event recieved!
[debug]output==>=thread-exited,id="1",group-id="i1"
[debug]output==>=thread-group-exited,id="i1",exit-code="01777777777777777777777"
[debug]output==>*stopped,reason="exited",exit-code="037777777777"
[debug]unparsable_output==>(gdb)
[debug]notification event recieved!
[debug]notification event recieved!
[debug]notification event recieved!
[debug]cmd==>00000000000-gdb-exit
[debug]GDBExecutor is not stopped, but command (-gdb-exit) was executed!
[debug]output==>00000000000^exit


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: debugger_gdbmi will not run CB
« Reply #24 on: April 08, 2012, 09:03:15 am »
Are you still using the python pretty printers?
Can you try to remove the two source commands?
(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 Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: debugger_gdbmi will not run CB
« Reply #25 on: April 08, 2012, 11:53:14 am »
Are you still using the python pretty printers?
Can you try to remove the two source commands?

I've tried both ways. I've run gdb.exe, gdb-python27.exe with both use pretty printers and without.

Essentially, gdbmi issues:
Code
[debug]Executing command: c:\Usr\mingw461\bin\gdb.exe -fullname  -quiet --interpreter=mi -args C:\Usr\Proj\cbDebug\trunk\src\devel\codeblocks.exe

done

[debug]Executor stopped
[debug]Debugger_GDB_MI::CommitBreakpoints
[debug]ActionsMap::Run -> starting action: 060A67D8 id: 1
[debug]RunAction::OnStart -> -exec-run
[debug]cmd==>10000000000-exec-run
[debug]output==>=thread-group-added,id="i1"

starts loading dll's and craps out on loading after about the 40th dll. It never gets to issue any other commands.

Note that gdbmi works from the command line. But if gdbmi is launched from debugger_gdbmi, it exits the i1 thread during dll loading. That means that one CB is already loaded, and gdbmi is loading another. If it's not sharing dll's it's loading multiple copies into memory.

I wonder if its running out of memory, though this system has 4 gigs and the regular gdb works. I cannot find those weird return codes anywhere on the internet.

The reason I'm guessing memory problems is because debugger_gdbmi work ok for me with small programs, like a wxWidgets Hello World program.

Is there any way you could upload your working gdb 7.4 to say a Dropbox public folder and let me try that?


« Last Edit: April 08, 2012, 11:58:29 am by Pecan »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: debugger_gdbmi will not run CB
« Reply #26 on: April 08, 2012, 01:04:04 pm »
Is there any way you could upload your working gdb 7.4 to say a Dropbox public folder and let me try that?
No, 7.4 crashed when I tried it. On windows I've working 7.3.50-blabla. I've posted a link to it I think.

I'm out of ideas.

@other dev: Can someone try to reproduce this problem?
(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!]