From bccbb89f68aa51658fd165c8cd993d388c135b61 Mon Sep 17 00:00:00 2001 From: Philippe Gil Date: Mon, 25 Nov 2013 13:40:55 +0100 Subject: [PATCH] Bug 421541 allow debugging of non C language when sizeof(void *) cannot be evaluated, log an error instead of aborting the debug session. Change-Id: Ic6b0e53645626b2174d93b64942d3caf3cae5c86 Signed-off-by: Philippe Gil Reviewed-on: https://git.eclipse.org/r/18815 Reviewed-by: Marc Khouzam IP-Clean: Marc Khouzam Tested-by: Marc Khouzam --- .../src/org/eclipse/cdt/dsf/gdb/service/GDBMemory.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBMemory.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBMemory.java index 82c0914934e..e6f994e2860 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBMemory.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBMemory.java @@ -8,6 +8,7 @@ * Contributors: * Mentor Graphics - Initial API and implementation * John Dallaway - Add methods to get the endianness and address size (Bug 225609) + * Philippe Gil (AdaCore) - Don't fail initializeMemoryData if sizeof(void *) cannot be evaluated (Bug 421541) *******************************************************************************/ package org.eclipse.cdt.dsf.gdb.service; @@ -143,6 +144,13 @@ public class GDBMemory extends MIMemory implements IGDBMemory { fAddressSizes.put(memContext, getData()); requestMonitor.done(); } + @Override + @ConfinedToDsfExecutor("fExecutor") + protected void handleError() { + // log the error, but go on initializing memory data. + GdbPlugin.getDefault().getLog().log(getStatus()); + requestMonitor.done(); + } }); } },