Hurd Native (Debugging with GDB)
Next: Darwin, Previous: Cygwin Native, Up: Native [Contents][Index]
21.1.5 Commands Specific to GNU Hurd Systems
This subsection describes GDB commands specific to the GNU Hurd native debugging.
set signals
set sigsThis command toggles the state of inferior signal interception by GDB. Mach exceptions, such as breakpoint traps, are not affected by this command.
sigsis a shorthand alias forsignals.show signals
show sigsShow the current state of intercepting inferior’s signals.
set signal-thread
set sigthreadThis command tells GDB which thread is the
libcsignal thread. That thread is run when a signal is delivered to a running process.set sigthreadis the shorthand alias ofset signal-thread.show signal-thread
show sigthreadThese two commands show which thread will run when the inferior is delivered a signal.
set stoppedThis commands tells GDB that the inferior process is stopped, as with the
SIGSTOPsignal. The stopped process can be continued by delivering a signal to it.show stoppedThis command shows whether GDB thinks the debuggee is stopped.
set exceptionsUse this command to turn off trapping of exceptions in the inferior. When exception trapping is off, neither breakpoints nor single-stepping will work. To restore the default, set exception trapping on.
show exceptionsShow the current state of trapping exceptions in the inferior.
set task pauseThis command toggles task suspension when GDB has control. Setting it to on takes effect immediately, and the task is suspended whenever GDB gets control. Setting it to off will take effect the next time the inferior is continued. If this option is set to off, you can use
set thread default pause onorset thread pause on(see below) to pause individual threads.show task pauseShow the current state of task suspension.
set task detach-suspend-countThis command sets the suspend count the task will be left with when GDB detaches from it.
show task detach-suspend-countShow the suspend count the task will be left with when detaching.
set task exception-port
set task excpThis command sets the task exception port to which GDB will forward exceptions. The argument should be the value of the send rights of the task.
set task excpis a shorthand alias.set noninvasiveThis command switches GDB to a mode that is the least invasive as far as interfering with the inferior is concerned. This is the same as using
set task pause,set exceptions, andset signalsto values opposite to the defaults.info send-rights
info receive-rights
info port-rights
info port-sets
info dead-names
info ports
info psetsThese commands display information about, respectively, send rights, receive rights, port rights, port sets, and dead names of a task. There are also shorthand aliases:
info portsforinfo port-rightsandinfo psetsforinfo port-sets.set thread pauseThis command toggles current thread suspension when GDB has control. Setting it to on takes effect immediately, and the current thread is suspended whenever GDB gets control. Setting it to off will take effect the next time the inferior is continued. Normally, this command has no effect, since when GDB has control, the whole task is suspended. However, if you used
set task pause off(see above), this command comes in handy to suspend only the current thread.show thread pauseThis command shows the state of current thread suspension.
set thread runThis command sets whether the current thread is allowed to run.
show thread runShow whether the current thread is allowed to run.
set thread detach-suspend-countThis command sets the suspend count GDB will leave on a thread when detaching. This number is relative to the suspend count found by GDB when it notices the thread; use
set thread takeover-suspend-countto force it to an absolute value.show thread detach-suspend-countShow the suspend count GDB will leave on the thread when detaching.
set thread exception-port
set thread excpSet the thread exception port to which to forward exceptions. This overrides the port set by
set task exception-port(see above).set thread excpis the shorthand alias.set thread takeover-suspend-countNormally, GDB’s thread suspend counts are relative to the value GDB finds when it notices each thread. This command changes the suspend counts to be absolute instead.
set thread default
show thread defaultEach of the above
set threadcommands has aset thread defaultcounterpart (e.g.,set thread default pause,set thread default exception-port, etc.). Thethread defaultvariety of commands sets the default thread properties for all threads; you can then change the properties of individual threads with the non-default commands.
Next: Darwin, Previous: Cygwin Native, Up: Native [Contents][Index]