comp.lang.ada
 help / color / mirror / Atom feed
* Problem using GPS to debug in C and Ada at the same time
@ 2014-07-03 20:50 NiGHTS
  2014-07-04  0:33 ` nights
  0 siblings, 1 reply; 3+ messages in thread
From: NiGHTS @ 2014-07-03 20:50 UTC (permalink / raw)


Subject: Problem using GPS to debug in C and Ada at the same time
Platform: Linux (Kubuntu)


I am trying to debug a C application with bindings to some simple Ada functions using the GNAT Programming Studio (GPS). The main entry point is in C.

I managed to compile both sources in GPS just fine (using gprbuild). I made sure to instruct the respective compilers to export debugging symbols (-g). 

When initializing the debugger, it loads the C main symbols just fine. I can set a breakpoint and follow the C code in the GPS IDE. The problem seems to be trying to set a breakpoint in the Ada code. GPS complains with the following error:

"No source file named unit1.adb."

NOTE: The file 'unit1' is where I attempted to set a breakpoint.


In Conclusion: 

How can I configure GPS to step through Ada code from a C code-base with a C main? I am open to manual workarounds if a GPS configuration is not available.


Thank you


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem using GPS to debug in C and Ada at the same time
  2014-07-03 20:50 Problem using GPS to debug in C and Ada at the same time NiGHTS
@ 2014-07-04  0:33 ` nights
  2014-07-04  6:20   ` J-P. Rosen
  0 siblings, 1 reply; 3+ messages in thread
From: nights @ 2014-07-04  0:33 UTC (permalink / raw)


I figured out what I was doing wrong. I was not properly compiling the Ada files using the -g option.

This is due to a confusion with the GPS project properties interface. In the switches -> Ada sub-menu I had to enter "-g" in the untitled field to make it work.

Would it have killed them to put a title on that field?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem using GPS to debug in C and Ada at the same time
  2014-07-04  0:33 ` nights
@ 2014-07-04  6:20   ` J-P. Rosen
  0 siblings, 0 replies; 3+ messages in thread
From: J-P. Rosen @ 2014-07-04  6:20 UTC (permalink / raw)


Le 04/07/2014 02:33, nights@unku.us a écrit :
> I figured out what I was doing wrong. I was not properly compiling
> the Ada files using the -g option.
> 
> This is due to a confusion with the GPS project properties interface.
> In the switches -> Ada sub-menu I had to enter "-g" in the untitled
> field to make it work.
> 
> Would it have killed them to put a title on that field?
> 

If you use the project interface, you have to check the (properly
marked) debug option, in the compile options and in the linker options.

The untitled field shows the resulting options line; it is editable for
those who need unforeseen options.
-- 
J-P. Rosen
Adalog
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00
http://www.adalog.fr


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-04  6:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-03 20:50 Problem using GPS to debug in C and Ada at the same time NiGHTS
2014-07-04  0:33 ` nights
2014-07-04  6:20   ` J-P. Rosen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox