Exemplo n.º 1
0
 public virtual void Execute(int timeout)
 {
     GdbEngine.SyncAdapter syncGdb = new GdbEngine.SyncAdapter(gdb);
     try
     {
         res = syncGdb.SendCmd(CommandString, timeout);
     }
     catch (TimeoutException ex)
     {
         Logger.Instance.Warn(ex.Message);
         throw ex;
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Sets mandatory parameters for correct communication with gdb
        /// </summary>
        protected void InitialiseGDBParameters()
        {
            try
            {
                GdbEngine.SyncAdapter sa = new GdbEngine.SyncAdapter(this);

                sa.SendCmd("set print repeats 1000", 5000);

                //Ignore the sigtraps created by DbgUiConnectToDbg() from old versions of ntdll.dll
                sa.SendCmd("handle SIGTRAP noprint nostop", 5000);

                sa.SendCmd("set print array-indexes on", 5000);
                sa.SendCmd("set new-console on", 5000);
                sa.SendCmd("set new-group on", 5000);
                sa.SendCmd("set width 999999999", 5000); //Keep GDB from wrapping long lines
            }
            catch (Exception m)
            {
                Logger.Instance.Error(m);
                throw new GdbException("Failed to initialise gdb parameters: " + m.Message);
            }
        }