From e74c4a507af77e8358d7bab79a167716cee4e837 Mon Sep 17 00:00:00 2001 From: charlet Date: Mon, 15 Oct 2007 13:57:26 +0000 Subject: [PATCH] 2007-10-15 Olivier Hainque * 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 | 4 ++-- gcc/ada/s-traent-vms.adb | 12 ++++++------ gcc/ada/s-traent-vms.ads | 11 +++++++---- gcc/ada/tb-alvms.c | 10 ++++------ 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/gcc/ada/g-trasym-vms-alpha.adb b/gcc/ada/g-trasym-vms-alpha.adb index f2babfaff8a..68bb5d87e59 100644 --- a/gcc/ada/g-trasym-vms-alpha.adb +++ b/gcc/ada/g-trasym-vms-alpha.adb @@ -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, diff --git a/gcc/ada/s-traent-vms.adb b/gcc/ada/s-traent-vms.adb index 029be03fa8b..3bf0d3f8635 100644 --- a/gcc/ada/s-traent-vms.adb +++ b/gcc/ada/s-traent-vms.adb @@ -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; diff --git a/gcc/ada/s-traent-vms.ads b/gcc/ada/s-traent-vms.ads index ab90478b0b4..33dc98894b1 100644 --- a/gcc/ada/s-traent-vms.ads +++ b/gcc/ada/s-traent-vms.ads @@ -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; diff --git a/gcc/ada/tb-alvms.c b/gcc/ada/tb-alvms.c index 22fc540855d..5905282490f 100644 --- a/gcc/ada/tb-alvms.c +++ b/gcc/ada/tb-alvms.c @@ -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 ++; -- 2.11.0