comp.lang.ada
 help / color / mirror / Atom feed
From: Sandor Lengyel <slengyel@chello.hu>
Subject: Problem in debugging GPS
Date: Tue, 26 Sep 2006 09:24:38 +0200
Date: 2006-09-26T09:24:38+02:00	[thread overview]
Message-ID: <22c29$4518d54e$50632e62$3203@news.chello.hu> (raw)

I modified GPS to work with gcc 4.1.1. using gcc 4.1.1

Now I try to debug it using gdb 6.3 (Ada enabled and ddd)

Something funny is happening.
In file projects-editor.adb I have the following code segment:


  function Create_Project
     (Registry : Projects.Registry.Project_Registry'Class;
      NameP, Path : String) return Project_Type
   is
      D       : constant String :=
        Path & To_File_Name (NameP) & Project_File_Extension;
      Project : Project_Node_Id;
      Project_Name : Name_Id;
      P : Project_Type;

   begin


--       Prj.Tree.Initialize (InTree);

      --  Adding the name of the project
      Project_Name := Get_String (NameP);
      Set_Name_Of (Project, InTree, Project_Name);

Now Entering Create_Projects and displaying NameP i see that NapmeP is:
(gnat.string.string_access) 0x91385cc.

Doing Stepi this value stayes even executing:

      D       : constant String :=
        Path & To_File_Name (NameP) & Project_File_Extension;

However doing one more Stepi the cursor jumps to 

      P : Project_Type;

and NameP value changes to:

(gnat.string.string_access) 0xfffffff.

The machine code executed is:
 <projects__editor__create_project+573>:      mov    0x8e42944,%ebx

This value stayes for the rest of the code.

Why?








             reply	other threads:[~2006-09-26  7:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-26  7:24 Sandor Lengyel [this message]
2006-09-26 19:25 ` Problem in debugging GPS Ludovic Brenta
2006-09-27 13:01 ` Martin Krischik
2006-09-27 15:51   ` Ludovic Brenta
2006-09-27 18:18     ` Martin Krischik
2006-09-27 19:15       ` Ludovic Brenta
2006-09-28  7:02         ` Martin Krischik
2006-09-28  6:01     ` Simon Wright
2006-09-28 10:53       ` Code duplication and component-based distributions (was: Problem in debugging GPS) Ludovic Brenta
replies disabled

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