Book a Demo

Author Topic: Debug with MinGW GDB  (Read 6547 times)

CorderBollie

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Debug with MinGW GDB
« on: March 30, 2012, 05:27:16 pm »
Hello.
I tried to use the integrated debugger to record a sequence.
The program is compiled with MinGW including debug information and I have created a run script for debugging using GDB (comming with MinGW) as debugger.
Although I'm able to start the program in EA the debugger is not able to set breakpoints and I get warnings in the debug windows like:
 * Failed to find Breakpoint
 * Warning, all breakpoints failed to bind...

So the question is: is it possible to use MinGW-compiled programs with the debugger using a GDB configuration on Windows?

SomersetGraham

  • EA User
  • **
  • Posts: 376
  • Karma: +1/-0
    • View Profile
Re: Debug with MinGW GDB
« Reply #1 on: March 30, 2012, 11:59:28 pm »
I have had this problem too,
I reported it to Sparx who are 'investigating' ::)
Using V12

CorderBollie

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Debug with MinGW GDB
« Reply #2 on: April 04, 2012, 04:22:31 pm »
Thank you for your reply.
I hope that 'investigation' will soon come to a solution.
Is there a way to follow the result of it via a bug/feature tracking system?

SomersetGraham

  • EA User
  • **
  • Posts: 376
  • Karma: +1/-0
    • View Profile
Re: Debug with MinGW GDB
« Reply #3 on: April 04, 2012, 05:24:23 pm »
Unfortunately not >:(
Using V12

Takeshi K

  • EA User
  • **
  • Posts: 620
  • Karma: +41/-1
    • View Profile
    • Sparx Systems Japan
Re: Debug with MinGW GDB
« Reply #4 on: April 08, 2012, 08:48:31 am »
Hello all,

Just for your information, I can set breakpoints and debug C programs on GDB, which complied by gcc of MinGW.

The EA help file says that GDB version 7 is necessary, and paths of source files do not include any spaces.

Hope this helps you.
--
t-kouno

CorderBollie

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Debug with MinGW GDB
« Reply #5 on: April 12, 2012, 04:38:17 pm »
Hi t-kouno,
which GDB version are you using?
Mine is 7.3.1 with GCC 4.6.1 and EA 9.3.931.

I do not have whitespaces in the GDB and program path and also the program is compiled with debug information.
I installed MinGW not into the standard installation directory however I have added the path to the compiler and debugger to the PATH variable.
As I said GDB can be found by EA but can still not bind/find the breakpoints.

These are the settings of the debug script:
Platform->Debugger: GDB  (Run)
path:
remote:
port:12345
host:localhost
fetch:T
dumpgdb:

Tried both i.e. local and remote debugging using a local GDB-Server but nothing works.
Any more hints from you about how to get this running?

Takeshi K

  • EA User
  • **
  • Posts: 620
  • Karma: +41/-1
    • View Profile
    • Sparx Systems Japan
Re: Debug with MinGW GDB
« Reply #6 on: April 12, 2012, 07:11:58 pm »
Hi CorderBollie,

Mine is: gdb 7.2, gcc 4.5.2 and EA is 9.3.931.

I do not know the reason why the EA debugger can not find breakpoints, but I recommend to get a detail log and send the log to Sparx support team.

To get the log, enter path to 'dumpgdb:' paramerter like:
dumpgdb: C:\temp\debug.log

You may find some clue in the log to solve the issue.

Hope this helps you.
--
t-kouno

CorderBollie

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Debug with MinGW GDB
« Reply #7 on: April 24, 2012, 04:37:08 pm »
Finally I've found a way to make it work.
However I think there's a bug in the way EA handles the default directory setting of the analyzer script or in controlling GDB via MI2 protocol.

To make it work I have to place all code into one directory (no subfolders allowed) and compile and link the executable into the same directory.
After that debugging works like expected.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8090
  • Karma: +118/-20
    • View Profile
Re: Debug with MinGW GDB
« Reply #8 on: April 26, 2012, 09:45:22 am »
Glad to hear you've got it to work.

The situation that I've used the GDB debugger has subdirectories, so that's not the entire problem.