Package uk.co.cwspencer.gdb.gdbmi

Examples of uk.co.cwspencer.gdb.gdbmi.GdbMiResultRecord


      "(gdb)\r\n";
    parser.process(messageStr.getBytes("US-ASCII"));
    List<GdbMiRecord> records = parser.getRecords();

    // Convert the message
    GdbMiResultRecord record = (GdbMiResultRecord) records.get(0);
    Object object = GdbMiMessageConverter.processRecord(record);
    Assert.assertNotNull(object);
    Assert.assertTrue(object instanceof GdbConnectedEvent);

    GdbConnectedEvent connectedEvent = (GdbConnectedEvent) object;
View Full Code Here


      "(gdb)\r\n";
    parser.process(messageStr.getBytes("US-ASCII"));
    List<GdbMiRecord> records = parser.getRecords();

    // Convert the message
    GdbMiResultRecord record = (GdbMiResultRecord) records.get(0);
    Object object = GdbMiMessageConverter.processRecord(record);
    Assert.assertNotNull(object);
    Assert.assertTrue(object instanceof GdbErrorEvent);

    GdbErrorEvent errorEvent = (GdbErrorEvent) object;
View Full Code Here

      "^exit\r\n";
    parser.process(messageStr.getBytes("US-ASCII"));
    List<GdbMiRecord> records = parser.getRecords();

    // Convert the message
    GdbMiResultRecord record = (GdbMiResultRecord) records.get(0);
    Object object = GdbMiMessageConverter.processRecord(record);
    Assert.assertNotNull(object);
    Assert.assertTrue(object instanceof GdbExitEvent);
  }
View Full Code Here

    parser.process(messageStr.getBytes("US-ASCII"));
    List<GdbMiRecord> records = parser.getRecords();

    // Convert the message
    {
      GdbMiResultRecord record = (GdbMiResultRecord) records.get(0);
      Object object = GdbMiMessageConverter.processRecord(record);
      Assert.assertNotNull(object);
      Assert.assertTrue(object instanceof GdbStoppedEvent);

      GdbStoppedEvent stoppedEvent = (GdbStoppedEvent) object;
      Assert.assertEquals(GdbStoppedEvent.Reason.BreakpointHit, stoppedEvent.reason);
      Assert.assertEquals(GdbBreakpoint.BreakpointDisposition.Keep,
        stoppedEvent.breakpointDisposition);
      Assert.assertEquals(new Integer(1), stoppedEvent.breakpointNumber);
      Assert.assertEquals(new Integer(0), stoppedEvent.threadId);
      Assert.assertEquals(true, stoppedEvent.allStopped);
      Assert.assertNull(stoppedEvent.stoppedThreads);

      Assert.assertEquals(new Long(0x08048564), stoppedEvent.frame.address);
      Assert.assertEquals("main", stoppedEvent.frame.function);
      Assert.assertEquals("myprog.c", stoppedEvent.frame.fileRelative);
      Assert.assertEquals("/home/nickrob/myprog.c", stoppedEvent.frame.fileAbsolute);
      Assert.assertEquals(new Integer(68), stoppedEvent.frame.line);

      Assert.assertEquals(2, stoppedEvent.frame.arguments.size());
      Assert.assertEquals("1", stoppedEvent.frame.arguments.get("argc"));
      Assert.assertEquals("0xbfc4d4d4", stoppedEvent.frame.arguments.get("argv"));
    }

    {
      GdbMiResultRecord record = (GdbMiResultRecord) records.get(1);
      Object object = GdbMiMessageConverter.processRecord(record);
      Assert.assertNotNull(object);
      Assert.assertTrue(object instanceof GdbStoppedEvent);

      GdbStoppedEvent stoppedEvent = (GdbStoppedEvent) object;
View Full Code Here

    parser.process(messageStr.getBytes("US-ASCII"));
    List<GdbMiRecord> records = parser.getRecords();

    // Convert the message
    {
      GdbMiResultRecord record = (GdbMiResultRecord) records.get(0);
      Object object = GdbMiMessageConverter.processRecord(record);
      Assert.assertNotNull(object);
      Assert.assertTrue(object instanceof GdbRunningEvent);

      GdbRunningEvent runningEvent = (GdbRunningEvent) object;
      Assert.assertEquals(false, runningEvent.allThreads);
      Assert.assertEquals(new Integer(2), runningEvent.threadId);
    }

    {
      GdbMiResultRecord record = (GdbMiResultRecord) records.get(1);
      Object object = GdbMiMessageConverter.processRecord(record);
      Assert.assertNotNull(object);
      Assert.assertTrue(object instanceof GdbRunningEvent);

      GdbRunningEvent runningEvent = (GdbRunningEvent) object;
View Full Code Here

      "(gdb)\r\n";
    parser.process(messageStr.getBytes("US-ASCII"));
    List<GdbMiRecord> records = parser.getRecords();

    // Convert the message
    GdbMiResultRecord record = (GdbMiResultRecord) records.get(0);
    Object object = GdbMiMessageConverter.processRecord(record, "-stack-list-frames");
    Assert.assertNotNull(object);
    Assert.assertTrue(object instanceof GdbStackTrace);

    GdbStackTrace stackTrace = (GdbStackTrace) object;
View Full Code Here

      "(gdb)\r\n";
    parser.process(messageStr.getBytes("US-ASCII"));
    List<GdbMiRecord> records = parser.getRecords();

    // Convert the message
    GdbMiResultRecord record = (GdbMiResultRecord) records.get(0);
    Object object = GdbMiMessageConverter.processRecord(record, "-break-insert");
    Assert.assertNotNull(object);
    Assert.assertTrue(object instanceof GdbBreakpoint);

    GdbBreakpoint breakpoint = (GdbBreakpoint) object;
View Full Code Here

TOP

Related Classes of uk.co.cwspencer.gdb.gdbmi.GdbMiResultRecord

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.