title: GDB reports "No line 92 in the current file." but I actually have line 92
body: <p>I encountered a very bizarre bug when I test my interrupt module of my os class project which is based on HOCA system. </p>
  
  <p>When I start my main function (which is from line66 to line101), but when I set the breakpoint at line92, gdb says </p>
  
  <p><code>No line 92 in the current file. Make breakpoint pending on future shared library load?</code></p>
  
  <p>Do you guys know what's going on here?</p>
  
  <p>Furthermore, when I set the breakpoint at line 92 and continue GDB, it reports :"</p>
  
  <pre><code>     trap: nonexistant memory
       address: -1
       memory size: 131072
       ERROR:  address greater than MEMORYSIZE
  
  
       Program received signal SIGSEGV, Segmentation fault.
       0x0000002e in ?? ()
  </code></pre>
  
  <p>"</p>
  
  <p>Source code is as follow:</p>
  
  <pre><code>/* This module coordinates the initialization of the nucleus and it starts the execution
   * of the first process, p1(). It also provides a scheduling function. The module contains
   * two functions: main() and init(). init() is static. It also contains a function that it
   * exports: schedule().
   */
  
  #include "../../h/const.h"
  #include "../../h/types.h"
  #include "../../h/util.h"
  #include "../../h/vpop.h"
  
  #include "../../h/procq.e"
  #include "../../h/asl.e"
  #include "../../h/trap.h"
  #include "../../h/int.h"
  
  proc_link RQ;       /* pointer to the tail of the Ready Queue */
  state_t st;         /* the starting state_t */
  extern int p1();
  
  /* This function determines how much physical memory there is in the system.
   * It then calls initProc(), initSemd(), trapinit() and intinit().
   */
  void static init(){
  
      STST(&amp;st);
  
      if(st.s_sp%PAGESIZE != 0){
          st.s_sp -= st.s_sp%PAGESIZE;
      }
  
      initProc();
      initSemd();
  
      trapinit();
      intinit();
  }
  
  
  /* If the RQ is not empty this function calls intschedule() and loads the state of
   * the process at the head of the RQ. If the RQ is empty it calls intdeadlock().
   */
  void schedule(){
      proc_t *front;
      front = headQueue(RQ);
  
      if (checkPointer(front)) {
          intschedule();
          LDST(&amp;(front-&gt;p_s));
      }
      else {
          intdeadlock();
      }
  }
  
  
  /* This function calls init(), sets up the processor state for p1(), adds p1() to the
   * RQ and calls schedule().
   */
  
  void main(){
      proc_t *pp1;  // pointer to process table entry
      state_t pp1state;  //process state
  
      long curr_time;   // to store the time
  
      init();  // initialize the process table, semaphore...
  
      /*setup the processor state for p1(),  adds p1() to the ReadyQueue */
      RQ.next = (proc_t *) ENULL;
      RQ.index = 1;
  
      pp1 = allocProc();
      if(!checkPointer(pp1)){
          return;
      }
  
      pp1-&gt;parent = (proc_t *) ENULL; // ENULL is set to -1
      pp1-&gt;child = (proc_t *) ENULL;
      pp1-&gt;sibling_next = pp1;
      pp1-&gt;sibling_prev = pp1;
  
      pp1state.s_sp = st.s_sp - (PAGESIZE*2);
      pp1state.s_pc = (int)p1;
      pp1state.s_sr.ps_s = 1;  // here should be line 92
  
      STCK(&amp;curr_time); //store the CPU time to curr_time
  
      pp1-&gt;p_s = pp1state;
      pp1-&gt;start_time = curr_time;
  
      insertProc(&amp;RQ, pp1);
  
      schedule();
  
      return;
  }
  </code></pre>