What does 'inferior' mean in the term 'inferior debugger'?

后端 未结 2 1637
一向
一向 2021-02-05 04:49

I didn\'t really understand the explanation for inferior in the GDB manual, and google doesn\'t yield anything more helpful.

Can anyone explain \'inferior\' in simple te

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-05 05:47

    In gdb, "inferior" refers to the process that you're debugging. E.g.

    (gdb) help info inferiors 
    IDs of specified inferiors (all inferiors if no argument).
    
    (gdb) info inferiors 
      Num  Description       Executable        
    * 1    process 12858     /usr/bin/true
    

    gdb can now debug multiple processes at once, so it has a command to switch between inferiors similar to how you can switch between threads.

    (gdb) help inferior 
    Use this command to switch between inferiors.
    The new inferior ID must be currently known.
    

    Most of the commands in the Inferiors and Programs section of the manual deals with debugging multiple processes concurrently.

提交回复
热议问题