Ejemplo n.º 1
0
 private void _GDBinstance_showLocation(object sender, GDBnewLocationEventArgs e)
 {
     if (this.InvokeRequired)
     {
         this.BeginInvoke(new EventHandler<GDBnewLocationEventArgs>(_GDBinstance_showLocation), new object[] { sender, e });
     }
     else
     {
         showTab(e.full_filename, e.filename, e.linenumber);
         toolStripStatusLabel1.Text = "stopped @0x"+e.address;
     }
 }
Ejemplo n.º 2
0
        GDBnewLocationEventArgs parseSourceLocation(string data)
        {

            GDBnewLocationEventArgs loc = new GDBnewLocationEventArgs();
            string dummy;

            loc.function = ParseTools.extract_data_betweenPatterns(data, "func=\"", "\"");
            loc.filename = ParseTools.extract_data_betweenPatterns(data, "file=\"", "\"");
            loc.full_filename = ParseTools.extract_data_betweenPatterns(data, "fullname=\"", "\"");


            dummy = ParseTools.extract_data_betweenPatterns(data, "line=\"", "\"");
            if (dummy != "")
                loc.linenumber = int.Parse(dummy);
            else
                loc.linenumber = -1;

            dummy = ParseTools.extract_data_betweenPatterns(data, "addr=\"0x", "\"");
            if (dummy != "")
                loc.address = int.Parse(dummy, System.Globalization.NumberStyles.HexNumber);
            else
                loc.address = -1;

            return loc;
        }