This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Ada] Fix gnatmem -q crash with new stack frame backtrace scheme
- To: gcc-patches at gcc dot gnu dot org
- Subject: [Ada] Fix gnatmem -q crash with new stack frame backtrace scheme
- From: bosch at gnat dot com
- Date: Thu, 25 Oct 2001 19:49:03 -0400 (EDT)
Applied for Pascal.
-Geert
2001-10-25 Pascal Obry <obry@gnat.com>
* gnatmem.adb (Read_Next): fix Curs2 value to properly handle quiet
mode case for ALLOC case.
* gnatmem.adb (Read_Next): correctly fix parsing in Quiet mode on
all platforms. Improvement of last change.
*** gnatmem.adb 2001/08/27 09:49:54 1.24
--- gnatmem.adb 2001/10/04 21:52:46 1.25
***************
*** 191,197 ****
Target_Protocol_Len : Integer;
Cross_Case : Boolean := False;
-
Tmp_Size : Storage_Count := 0;
Tmp_Address : Integer_Address;
Tmp_Alloc : Allocation;
--- 191,196 ----
***************
*** 291,297 ****
end if;
end;
-
if Cross_Case then
Put (FD, "target ");
Put (FD, Target_Protocol (1 .. Target_Protocol_Len));
--- 290,295 ----
***************
*** 697,703 ****
-- Read the size
if Quiet_Mode then
! Curs2 := 5;
else
Curs1 := 7;
Curs2 := Next_Separator - 1;
--- 695,701 ----
-- Read the size
if Quiet_Mode then
! Curs2 := 7;
else
Curs1 := 7;
Curs2 := Next_Separator - 1;
*** gnatmem.adb 2001/10/04 21:52:46 1.25
--- gnatmem.adb 2001/10/08 09:07:35 1.26
***************
*** 691,704 ****
return Eof;
elsif Line (1 .. 5) = "ALLOC" then
-- Read the size
! if Quiet_Mode then
! Curs2 := 7;
! else
! Curs1 := 7;
! Curs2 := Next_Separator - 1;
Tmp_Size := Storage_Count'Value (Line (Curs1 .. Curs2));
end if;
--- 691,704 ----
return Eof;
elsif Line (1 .. 5) = "ALLOC" then
+ -- ALLOC ^ <size> ^0x <addr> ^
-- Read the size
! Curs1 := 7;
! Curs2 := Next_Separator - 1;
!
! if not Quiet_Mode then
Tmp_Size := Storage_Count'Value (Line (Curs1 .. Curs2));
end if;
***************
*** 711,716 ****
--- 711,717 ----
return Alloc;
elsif Line (1 .. 5) = "DEALL" then
+ -- DEALL ^ 0x <addr> ^
-- Read the address, skip "^0x"