1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-06 17:26:01 +02:00

Bug 369594: GDB 7.4 now reports solib events in MI, but no longer in CLI

This commit is contained in:
Marc Khouzam 2012-02-06 15:16:20 -05:00
parent 2e5c77c1ab
commit 8a73a23e9d

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others. * Copyright (c) 2000, 2012 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -9,6 +9,7 @@
* QNX Software Systems - Initial API and implementation * QNX Software Systems - Initial API and implementation
* Norbert Ploett, Siemens AG - fix for bug 119370 * Norbert Ploett, Siemens AG - fix for bug 119370
* Hewlett-Packard Development Company - fix for bug 109733 (null check in setPrompt) * Hewlett-Packard Development Company - fix for bug 109733 (null check in setPrompt)
* Marc Khouzam (Ericsson) - Bug 369594: GDB 7.4 now reports solib events in MI, but no longer in CLI
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.debug.mi.core; package org.eclipse.cdt.debug.mi.core;
@ -306,7 +307,7 @@ public class RxThread extends Thread {
} }
// GDB does not provide reason when stopping on a shared library // GDB does not provide reason when stopping on a shared library
// event or because of a catchpoint (in gdb < 7.0). // event (gdb < 7.4) or because of a catchpoint (in gdb < 7.0).
// Hopefully this will be fixed in a future version. Meanwhile, // Hopefully this will be fixed in a future version. Meanwhile,
// we will use a hack to cope. On most platform we can detect by // we will use a hack to cope. On most platform we can detect by
// looking at the console stream for phrase. Although it is a // looking at the console stream for phrase. Although it is a
@ -427,13 +428,13 @@ public class RxThread extends Thread {
} }
} }
} }
// GDB does not have reason when stopping on shared, hopefully // GDB does not have reason when stopping on shared (gdb < 7.4)
// this will be fix in newer version meanwhile, we will use a hack // we will use a hack
// to cope. On most platform we can detect this state by looking at the // to cope. On most platform we can detect this state by looking at the
// console stream for the phrase: // console stream for the phrase:
// ~"Stopped due to shared library event\n" // ~"Stopped due to shared library event\n"
// //
// Althought it is a _real_ bad idea to do this, we do not have // Although it is a _real_ bad idea to do this, we do not have
// any other alternatives. // any other alternatives.
if (list.isEmpty()) { if (list.isEmpty()) {
String[] logs = getStreamRecords(); String[] logs = getStreamRecords();
@ -533,7 +534,10 @@ public class RxThread extends Thread {
event = new MIInferiorSignalExitEvent(session, rr); event = new MIInferiorSignalExitEvent(session, rr);
} }
session.getMIInferior().setTerminated(0,false); session.getMIInferior().setTerminated(0,false);
} else if ("shlib-event".equals(reason)) { //$NON-NLS-1$ } else if ("shlib-event".equals(reason) || //$NON-NLS-1$
// GDB 7.4 reports this event as "solib-event"
// Bug 369594
"solib-event".equals(reason)) {//$NON-NLS-1$
if (exec != null) { if (exec != null) {
event = new MISharedLibEvent(session, exec); event = new MISharedLibEvent(session, exec);
} else if (rr != null) { } else if (rr != null) {