OSDN Git Service

2007-10-15 Olivier Hainque <hainque@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 15 Oct 2007 13:57:26 +0000 (13:57 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 15 Oct 2007 13:57:26 +0000 (13:57 +0000)
* tb-alvms.c (tb_entry_t, __gnat_backtrace): Store a frame pointer
instead of a procedure value in each traceback entry.

* g-trasym-vms-alpha.adb (Symbolic_Traceback): Pass frame pointer
instead of procedure value to TBK$SYMBOLIZE.

* s-traent-vms.adb (PV_For): Rename as FP_For and access the proper
field.
(TB_Entry_For): Account for the PV/FP renaming.

* s-traent-vms.ads (Traceback_Entry): Rename PV component into FP and
add comment.
(Null_TB_Entry): Account for change of component name.
(PV_For): Rename as FP_For.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129338 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/g-trasym-vms-alpha.adb
gcc/ada/s-traent-vms.adb
gcc/ada/s-traent-vms.ads
gcc/ada/tb-alvms.c

index f2babfa..68bb5d8 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---           Copyright (C) 1999-2006, Free Software Foundation, Inc.        --
+--           Copyright (C) 1999-2007, Free Software Foundation, Inc.        --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -229,7 +229,7 @@ package body GNAT.Traceback.Symbolic is
               (Status,
                PC_For (Traceback (J)),
                PC_For (Traceback (J)),
-               PV_For (Traceback (J)),
+               FP_For (Traceback (J)),
                Return_Address,
                Image_Name_Addr,
                Module_Name_Addr,
index 029be03..3bf0d3f 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 2003-2006, Free Software Foundation, Inc.         --
+--          Copyright (C) 2003-2007, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -43,13 +43,13 @@ package body System.Traceback_Entries is
    end PC_For;
 
    ------------
-   -- PV_For --
+   -- FP_For --
    ------------
 
-   function PV_For (TB_Entry : Traceback_Entry) return System.Address is
+   function FP_For (TB_Entry : Traceback_Entry) return System.Address is
    begin
-      return TB_Entry.PV;
-   end PV_For;
+      return TB_Entry.FP;
+   end FP_For;
 
    ------------------
    -- TB_Entry_For --
@@ -57,7 +57,7 @@ package body System.Traceback_Entries is
 
    function TB_Entry_For (PC : System.Address) return Traceback_Entry is
    begin
-      return (PC => PC, PV => System.Null_Address);
+      return (PC => PC, FP => System.Null_Address);
    end TB_Entry_For;
 
 end System.Traceback_Entries;
index ab90478..33dc988 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2003-2005 Free Software Foundation, Inc.          --
+--          Copyright (C) 2003-2007, Free Software Foundation, Inc.         --
 --                                                                          --
 -- This specification is derived from the Ada Reference Manual for use with --
 -- GNAT. The copyright notice above, and the license provisions that follow --
 package System.Traceback_Entries is
    pragma Preelaborate;
 
+   --  Symbolization is done by a VMS service which requires an instruction
+   --  and a frame pointer for each traceback entry.
+
    type Traceback_Entry is record
       PC : System.Address;
-      PV : System.Address;
+      FP : System.Address;
    end record;
 
    pragma Suppress_Initialization (Traceback_Entry);
 
    Null_TB_Entry : constant Traceback_Entry :=
                      (PC => System.Null_Address,
-                      PV => System.Null_Address);
+                      FP => System.Null_Address);
 
    function PC_For (TB_Entry : Traceback_Entry) return System.Address;
-   function PV_For (TB_Entry : Traceback_Entry) return System.Address;
+   function FP_For (TB_Entry : Traceback_Entry) return System.Address;
 
    function TB_Entry_For (PC : System.Address) return Traceback_Entry;
 
index 22fc540..5905282 100644 (file)
@@ -6,7 +6,7 @@
  *                                                                          *
  *                          C Implementation File                           *
  *                                                                          *
- *                     Copyright (C) 2003-2005, AdaCore                     *
+ *                     Copyright (C) 2003-2007, AdaCore                     *
  *                                                                          *
  * GNAT is free software;  you can  redistribute it  and/or modify it under *
  * terms of the  GNU General Public License as published  by the Free Soft- *
@@ -337,8 +337,8 @@ unwind_kernel_handler (frame_state_t * fs)
    system functions need more than just a mere PC to compute info on a frame
    (e.g. for non-symbolic->symbolic translation purposes).  */
 typedef struct {
-  ADDR pc;
-  ADDR pv;
+  ADDR pc; /* instruction pointer */
+  ADDR fp; /* frame pointer */
 } tb_entry_t;
 
 /********************
@@ -375,8 +375,6 @@ __gnat_backtrace (void **array, int size,
   cnt = 0;
   while (cnt < size)
     {
-      PDSCDEF * pv = PV_FOR (frame_state.fp);
-
       /* Stop if either the frame contents or the unwinder say so.  */
       if (STOP_FRAME)
         break;
@@ -385,7 +383,7 @@ __gnat_backtrace (void **array, int size,
          && (frame_state.pc < exclude_min || frame_state.pc > exclude_max))
        {
          tbe->pc = (ADDR) frame_state.pc;
-         tbe->pv = (ADDR) PV_FOR (frame_state.fp);
+         tbe->fp = (ADDR) frame_state.fp;
 
          cnt ++;
          tbe ++;