comp.lang.ada
 help / color / mirror / Atom feed
* No symbol table loaded - GNAT Community 2019
@ 2019-06-03  2:38 Ricardo Brandão
  2019-06-04 11:26 ` alby.gamper
  2019-06-09 14:12 ` Ricardo Brandão
  0 siblings, 2 replies; 10+ messages in thread
From: Ricardo Brandão @ 2019-06-03  2:38 UTC (permalink / raw)


Hi,

I'm starting in Ada. The first thing I did was install GNAT Community 2019 on my computer with Windows 10:

See below a copy of about box:

GPS 19.1 (20190106) hosted on x86_64-pc-mingw32
GNAT Community 2019 (20190517-83)

the GNAT Programming Studio

(c) 2001-2019 AdaCore

So, I was following the tutorial of Ada Core site, and at Debug section [1] I didn't get see the debug working.

The steps (following the tutorial):
1. Clicked on Build & Debug sdc.adb toolbar button.
2. On the call stack window, clicked on the menu (three lines on the top right corner) and mark Show Frame Number.
3. Clicked on the Debug continue button and type input.txt in the text input field. 
4. Here I found the first thing different: the tutorial ask to check ‘Stop at beginning of main subprogram’ and uncheck ‘Use exec dir instead of current dir’. Only ‘Use exec dir instead of current dir’ could be found.
5. But I clicked Ok to continue.

And the problem: when clicked ok, I got the message:

file D:/GNAT/2019/share/examples/gps/tutorial/obj/sdc.exe
(gdb) catch exception
(gdb) start input.txt
(gdb) No symbol table loaded.  Use the "file" command.


Looking the output on Messages tab, I could see the gprbuild output:

gprbuild -d -PD:\GNAT\2019\share\examples\gps\tutorial\sdc.gpr -XBuild=DEBUG

Is there any problem with GNAT installation? 

Thanks

[1] http://docs.adacore.com/live/wave/gps/html/gps_tutorial/debug.html

--
Ricardo Brandão

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

* Re: No symbol table loaded - GNAT Community 2019
  2019-06-03  2:38 No symbol table loaded - GNAT Community 2019 Ricardo Brandão
@ 2019-06-04 11:26 ` alby.gamper
  2019-06-04 14:52   ` Ricardo Brandão
  2019-06-09 14:12 ` Ricardo Brandão
  1 sibling, 1 reply; 10+ messages in thread
From: alby.gamper @ 2019-06-04 11:26 UTC (permalink / raw)


On Monday, June 3, 2019 at 12:38:29 PM UTC+10, Ricardo Brandão wrote:
> Hi,
> 
> I'm starting in Ada. The first thing I did was install GNAT Community 2019 on my computer with Windows 10:
> 
> See below a copy of about box:
> 
> GPS 19.1 (20190106) hosted on x86_64-pc-mingw32
> GNAT Community 2019 (20190517-83)
> 
> the GNAT Programming Studio
> 
> (c) 2001-2019 AdaCore
> 
> So, I was following the tutorial of Ada Core site, and at Debug section [1] I didn't get see the debug working.
> 
> The steps (following the tutorial):
> 1. Clicked on Build & Debug sdc.adb toolbar button.
> 2. On the call stack window, clicked on the menu (three lines on the top right corner) and mark Show Frame Number.
> 3. Clicked on the Debug continue button and type input.txt in the text input field. 
> 4. Here I found the first thing different: the tutorial ask to check ‘Stop at beginning of main subprogram’ and uncheck ‘Use exec dir instead of current dir’. Only ‘Use exec dir instead of current dir’ could be found.
> 5. But I clicked Ok to continue.
> 
> And the problem: when clicked ok, I got the message:
> 
> file D:/GNAT/2019/share/examples/gps/tutorial/obj/sdc.exe
> (gdb) catch exception
> (gdb) start input.txt
> (gdb) No symbol table loaded.  Use the "file" command.
> 
> 
> Looking the output on Messages tab, I could see the gprbuild output:
> 
> gprbuild -d -PD:\GNAT\2019\share\examples\gps\tutorial\sdc.gpr -XBuild=DEBUG
> 
> Is there any problem with GNAT installation? 
> 
> Thanks
> 
> [1] http://docs.adacore.com/live/wave/gps/html/gps_tutorial/debug.html
> 
> --
> Ricardo Brandão

Hi Ricardo

GPS for new comer's can/may be a struggle depending on what other IDE you are
familiar with, as they all tend to be different to a lesser or larger degree 
depending on their pedigree, be it Emacs, Eclipse, Visual Code, JetBrains IDE's
or Visual Studio.

Their are a few add-in's to the above IDE's that may suit you better, depending
on your IDE of choice, these being

1) Emacs - https://groups.google.com/forum/#!topic/comp.lang.ada/FaYk4LzQG7E
2) Eclipse - I believe Adacore had/have a plugin ?
3) Visual Code - Their are few plugins for Ada available, which includes a LSP
(ie intellisense capabilities)
3) JetBrains - ?
4) Visual Studio 2017/2019 - Their is a plugin called "VisualAda" available at 
https://marketplace.visualstudio.com/items?itemName=AlexGamper.VisualAda

If you advise us on what your preference is (WRT IDE of choice) then we can
better advise you, as their are a few choices available to you, be it GPS or
any of the above.

Alex

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

* Re: No symbol table loaded - GNAT Community 2019
  2019-06-04 11:26 ` alby.gamper
@ 2019-06-04 14:52   ` Ricardo Brandão
  2019-06-04 15:42     ` Anh Vo
  2019-06-04 15:46     ` J-P. Rosen
  0 siblings, 2 replies; 10+ messages in thread
From: Ricardo Brandão @ 2019-06-04 14:52 UTC (permalink / raw)



Hi Alex

> GPS for new comer's can/may be a struggle depending on what other IDE you are
> familiar with, as they all tend to be different to a lesser or larger degree 
> depending on their pedigree, be it Emacs, Eclipse, Visual Code, JetBrains IDE's
> or Visual Studio.


I don't like IDEs so much. In my point of view, some times there are a lot of "magic" behind the scenes. When every thing works fine, ok, but when have any problem, I stuck with no clue what is actually happens.

> Their are a few add-in's to the above IDE's that may suit you better, depending
> on your IDE of choice, these being
> 
> 1) Emacs - https://groups.google.com/forum/#!topic/comp.lang.ada/FaYk4LzQG7E
> 2) Eclipse - I believe Adacore had/have a plugin ?
> 3) Visual Code - Their are few plugins for Ada available, which includes a LSP
> (ie intellisense capabilities)
> 3) JetBrains - ?
> 4) Visual Studio 2017/2019 - Their is a plugin called "VisualAda" available at 
> https://marketplace.visualstudio.com/items?itemName=AlexGamper.VisualAda
> 
> If you advise us on what your preference is (WRT IDE of choice) then we can
> better advise you, as their are a few choices available to you, be it GPS or
> any of the above.

Actually, I like to compile and debug directly on command line, and use Vim to edit. And use IDEs, when I'm a newbie on the technology or when I know exactly what is happen. IDE could be very useful for code completion, create make files, and so on.

So, I normally use Arduino IDE to do my programs for embedded systems. And I've already used  CodeBlocks when I had to write a C++ system.

But WRT problem, it looks like the GPS doesn't get to make gdb load symbols. Then I tried to find out where (or how) GPS runs gcc command to verify if it has any -g option.

I imagine there is some wrong configuration or any conflict with any gcc already installed. Does it make sense?

The program is working fine, only debug procedure is not working.

Thanks

--
Ricardo Brandão


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

* Re: No symbol table loaded - GNAT Community 2019
  2019-06-04 14:52   ` Ricardo Brandão
@ 2019-06-04 15:42     ` Anh Vo
  2019-06-04 16:12       ` Ricardo Brandão
  2019-06-04 15:46     ` J-P. Rosen
  1 sibling, 1 reply; 10+ messages in thread
From: Anh Vo @ 2019-06-04 15:42 UTC (permalink / raw)


On Tuesday, June 4, 2019 at 7:52:09 AM UTC-7, Ricardo Brandão wrote:
 
> But WRT problem, it looks like the GPS doesn't get to make gdb load symbols. Then I tried to find out where (or how) GPS runs gcc command to verify if it has any -g option.
 
Check your project file. It is a text file with .gpr extension. This file should contain it if it is specified.

Anh Vo 


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

* Re: No symbol table loaded - GNAT Community 2019
  2019-06-04 14:52   ` Ricardo Brandão
  2019-06-04 15:42     ` Anh Vo
@ 2019-06-04 15:46     ` J-P. Rosen
  1 sibling, 0 replies; 10+ messages in thread
From: J-P. Rosen @ 2019-06-04 15:46 UTC (permalink / raw)


Le 04/06/2019 à 16:52, Ricardo Brandão a écrit :
> But WRT problem, it looks like the GPS doesn't get to make gdb load
> symbols. Then I tried to find out where (or how) GPS runs gcc command
> to verify if it has any -g option.
> 
> I imagine there is some wrong configuration or any conflict with any
> gcc already installed. Does it make sense?

Well, OF COURSE, you have to check the "debug" option in the parameters
if you want to use gdb...
-- 
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] 10+ messages in thread

* Re: No symbol table loaded - GNAT Community 2019
  2019-06-04 15:42     ` Anh Vo
@ 2019-06-04 16:12       ` Ricardo Brandão
  2019-06-04 17:21         ` Anh Vo
  0 siblings, 1 reply; 10+ messages in thread
From: Ricardo Brandão @ 2019-06-04 16:12 UTC (permalink / raw)


Hi Ahn Vo

> Check your project file. It is a text file with .gpr extension. This file should contain it if it is specified.
> 

This is the content of my gpr file

project Sdc is

   for Languages use ("ada");
   for Source_Dirs use ("common", "struct");
   for Main use ("sdc.adb");
   type Build_Type is
      ("PRODUCTION", "DEBUG");
   Build : Build_Type := external ("Build", "DEBUG");
   for Object_Dir use "obj";

   package Compiler is
      case Build is
         when "DEBUG" =>
            for Switches ("ada") use ("-gnatwe", "-gnaty", "-gnato", "-g");
            for Switches ("screen_output.adb") use ("-gnatwe", "-gnaty", "-g");

         when "PRODUCTION" =>
            for Switches ("ada") use ("-O2", "-gnatn", "-gnatwe", "-gnaty", "-gnatp");
      end case;
   end Compiler;

   package Builder is
      case Build is
         when "DEBUG" =>
            for Switches ("ada") use ("-g");

         when "PRODUCTION" =>
            for Switches ("ada") use ();
      end case;
   end Builder;

   package Binder is
      for Switches ("ada") use ("-static");
   end Binder;

   package CodePeer is
      for Switches use ("-level", "3");
   end CodePeer;

end Sdc;

As I could noticed the -g option is there. Even though I did not change it. Is the same that came with GPS installation.

The mystery is why gdb could not load the symbol table

Thanks

--
Ricardo Brandao 

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

* Re: No symbol table loaded - GNAT Community 2019
  2019-06-04 16:12       ` Ricardo Brandão
@ 2019-06-04 17:21         ` Anh Vo
  2019-06-04 19:13           ` Ricardo Brandão
  0 siblings, 1 reply; 10+ messages in thread
From: Anh Vo @ 2019-06-04 17:21 UTC (permalink / raw)


On Tuesday, June 4, 2019 at 9:12:40 AM UTC-7, Ricardo Brandão wrote:
> Hi Ahn Vo
> 
> > Check your project file. It is a text file with .gpr extension. This file should contain it if it is specified.
> > 
> 
> This is the content of my gpr file
> 
> project Sdc is


It worked fined on mine running on Windows 7. Please check if you have generated sdc.exe in the nested obj directory.

Anh Vo


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

* Re: No symbol table loaded - GNAT Community 2019
  2019-06-04 17:21         ` Anh Vo
@ 2019-06-04 19:13           ` Ricardo Brandão
  0 siblings, 0 replies; 10+ messages in thread
From: Ricardo Brandão @ 2019-06-04 19:13 UTC (permalink / raw)


Hi

> 
> It worked fined on mine running on Windows 7. Please check if you have generated sdc.exe in the nested obj directory.
> 

Yes, the sdc.exe file is on obj directory 

This is the message on Debugger Console when I click "Build & Debug sdc.adb" button:

file D:/GNAT/2019/share/examples/gps/tutorial/obj/sdc.exe
(gdb) catch exception
(gdb) 


When I click Debug -> Continue button, the messages:

file D:/GNAT/2019/share/examples/gps/tutorial/obj/sdc.exe
(gdb) catch exception
(gdb) start input.txt
(gdb) No symbol table loaded.  Use the "file" command.


start input.txt
(gdb) No symbol table loaded.  Use the "file" command.


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

* Re: No symbol table loaded - GNAT Community 2019
  2019-06-03  2:38 No symbol table loaded - GNAT Community 2019 Ricardo Brandão
  2019-06-04 11:26 ` alby.gamper
@ 2019-06-09 14:12 ` Ricardo Brandão
  2019-06-09 15:26   ` Anh Vo
  1 sibling, 1 reply; 10+ messages in thread
From: Ricardo Brandão @ 2019-06-09 14:12 UTC (permalink / raw)


Hi guys,

I found the problem!

I had another copy of GCC installed:

c:\>where gcc
c:\MinGW\bin\gcc.exe
D:\GNAT\2019\bin\gcc.exe

Removing c:\MinGW\gin\gcc.exe from PATH environment variable, I got solve the problem!


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

* Re: No symbol table loaded - GNAT Community 2019
  2019-06-09 14:12 ` Ricardo Brandão
@ 2019-06-09 15:26   ` Anh Vo
  0 siblings, 0 replies; 10+ messages in thread
From: Anh Vo @ 2019-06-09 15:26 UTC (permalink / raw)


On Sunday, June 9, 2019 at 7:12:47 AM UTC-7, Ricardo Brandão wrote:
> Hi guys,
> 
> I found the problem!
> 
> I had another copy of GCC installed:
> 
> c:\>where gcc
> c:\MinGW\bin\gcc.exe
> D:\GNAT\2019\bin\gcc.exe
> 
> Removing c:\MinGW\gin\gcc.exe from PATH environment variable, I got solve the problem!

I am glad that your problem has been resolved.

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

end of thread, other threads:[~2019-06-09 15:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-03  2:38 No symbol table loaded - GNAT Community 2019 Ricardo Brandão
2019-06-04 11:26 ` alby.gamper
2019-06-04 14:52   ` Ricardo Brandão
2019-06-04 15:42     ` Anh Vo
2019-06-04 16:12       ` Ricardo Brandão
2019-06-04 17:21         ` Anh Vo
2019-06-04 19:13           ` Ricardo Brandão
2019-06-04 15:46     ` J-P. Rosen
2019-06-09 14:12 ` Ricardo Brandão
2019-06-09 15:26   ` Anh Vo

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