From 96bd5390000735279ebf011dbcd4a5a7448c66bf Mon Sep 17 00:00:00 2001 From: Jean-Paul Mari Date: Wed, 7 Aug 2019 00:48:11 -0400 Subject: [PATCH 1/1] Fix the support of the DRAM size limit option in the heap allocation window --- docs/vj_HistoryNotes.txt | 1 + src/debugger/heapallocatorbrowser.cpp | 15 ++++++--------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/docs/vj_HistoryNotes.txt b/docs/vj_HistoryNotes.txt index 93a7cc9..16a719b 100644 --- a/docs/vj_HistoryNotes.txt +++ b/docs/vj_HistoryNotes.txt @@ -87,6 +87,7 @@ Git commit: TBD 50) The -d command line option, dedicated to the debugger, has been renamed to avoid duplication with the dsp one -- -d has been renamed by -D because another -d was also used for the dsp command line option 51) Removed the sorting filter in the all watches window +52) Fix the support of the DRAM size limit option in the heap allocation window Release 3 (13th November 2017) ------------------------------ diff --git a/src/debugger/heapallocatorbrowser.cpp b/src/debugger/heapallocatorbrowser.cpp index 024a9cf..1431fd9 100644 --- a/src/debugger/heapallocatorbrowser.cpp +++ b/src/debugger/heapallocatorbrowser.cpp @@ -5,14 +5,11 @@ // // JPM = Jean-Paul Mari // -// Who When What -// --- ---------- ----------------------------------------------------------- -// JPM 01/08/2017 Created this file -// JPM 09/05/2018 Support of the DRAM size limit option -// JPM 09/05/2018 Use definitions for error instead of hard values -// JPM 09/05/2018 Detect if heap allocation shares space with SP (Stack) -// JPM 09/06/2018 Added a status bar and better status report -// JPM 09/07/2018 Set information values in a tab +// Who When (MM/DD/YY) What +// --- --------------- ----------------------------------------------------------- +// JPM 01/08/2017 Created this file +// JPM Sept./2018 Support of the DRAM size limit option, use definitions for error instead of hard values, detect if heap allocation shares space with SP (Stack), added a status bar and better status report, and set information values in a tab +// JPM 07/04/2019 Fix the support of the DRAM size limit option // // STILL TO DO: @@ -189,7 +186,7 @@ void HeapAllocatorBrowserWindow::RefreshContents(void) { if (Adr68K = DBGManager_GetGlobalVariableAdrFromName((char *)"alloc")) { - if (!(Adr68K = (jaguarMainRAM[Adr68K] << 24) + (jaguarMainRAM[Adr68K + 1] << 16) + (jaguarMainRAM[Adr68K + 2] << 8) + (jaguarMainRAM[Adr68K + 3])) || ((Adr68K < 0x4000) || (Adr68K >= 0x200000))) + if (!(Adr68K = (jaguarMainRAM[Adr68K] << 24) + (jaguarMainRAM[Adr68K + 1] << 16) + (jaguarMainRAM[Adr68K + 2] << 8) + (jaguarMainRAM[Adr68K + 3])) || ((Adr68K < 0x4000) || (Adr68K >= vjs.DRAM_size))) { sprintf(msg, "Memory allocator not yet initialised"); Error = HA_MEMORYALLOCATORNOTINITIALIZED; -- 2.20.1