Commit 23d083f2 by Olivier Hainque Committed by Arnaud Charlet

tb-alvms.c (tb_entry_t, [...]): Store a frame pointer instead of a procedure…

tb-alvms.c (tb_entry_t, [...]): Store a frame pointer instead of a procedure value in each traceback entry.

2007-10-15  Olivier Hainque  <hainque@adacore.com>

	* 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.

From-SVN: r129338
parent ca14fd02
......@@ -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,
......
......@@ -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;
......@@ -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 --
......@@ -40,19 +40,22 @@
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;
......
......@@ -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 ++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment