Package uk.co.cwspencer.gdb

Examples of uk.co.cwspencer.gdb.Gdb$CommandData


        m_console = (ConsoleView) executionResult.getExecutionConsole();
        m_project = project;
        debugSession = session;

        // Prepare GDB
        m_gdb = new Gdb(m_configuration.GDB_PATH, m_configuration.workingDir, this);

        // Create the GDB console
        m_gdbConsole = new GdbConsoleView(m_gdb, session.getProject());
        m_gdbRawConsole = new ConsoleViewImpl(session.getProject(), true);
View Full Code Here


            } catch (IOException ignored) {
                debugSession.stop();
                return null;
            }

            final Gdb gdbProcess = debugProcess.m_gdb;

            // Queue startup commands
            gdbProcess.sendCommand("-list-features", new Gdb.GdbEventCallback() {
                 @Override
                 public void onGdbCommandCompleted(GdbEvent event) {
                      gdbProcess.onGdbCapabilitiesReady(event);
                 }
            });
            gdbProcess.sendCommand("add-auto-load-safe-path " + goRootPath);

            String pythonRuntime = goRootPath + "/src/pkg/runtime/runtime-gdb.py";
            if (GoSdkUtil.checkFileExists(pythonRuntime)) {
                gdbProcess.sendCommand("source " + pythonRuntime);
            }

            gdbProcess.sendCommand("file " + execName);

            //If we got any script arguments, pass them into gdb
            if(!configuration.scriptArguments.equals("")) {
                gdbProcess.sendCommand("set args " + configuration.scriptArguments);
            }

            debugSession.initBreakpoints();

            // Send startup commands
            String[] commandsArray = configuration.STARTUP_COMMANDS.split("\\r?\\n");
            for (String command : commandsArray) {
                command = command.trim();
                if (!command.isEmpty()) {
                    gdbProcess.sendCommand(command);
                }
            }

            if (configuration.autoStartGdb) {
                gdbProcess.sendCommand("run");
            }

            return debugSession.getRunContentDescriptor();
        }
    }
View Full Code Here

TOP

Related Classes of uk.co.cwspencer.gdb.Gdb$CommandData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.