mirror of
https://github.com/go-delve/delve.git
synced 2025-11-01 12:01:35 +08:00
Add some documentation
This commit is contained in:
@ -198,6 +198,8 @@ func (dbp *DebuggedProcess) Status() *syscall.WaitStatus {
|
|||||||
return dbp.CurrentThread.Status
|
return dbp.CurrentThread.Status
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Loop through all threads, printing their information
|
||||||
|
// to the console.
|
||||||
func (dbp *DebuggedProcess) PrintThreadInfo() error {
|
func (dbp *DebuggedProcess) PrintThreadInfo() error {
|
||||||
for _, th := range dbp.Threads {
|
for _, th := range dbp.Threads {
|
||||||
if err := th.PrintInfo(); err != nil {
|
if err := th.PrintInfo(); err != nil {
|
||||||
|
|||||||
@ -48,6 +48,8 @@ func (thread *ThreadContext) CurrentPC() (uint64, error) {
|
|||||||
return regs.PC(), nil
|
return regs.PC(), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PrintInfo prints out the thread status
|
||||||
|
// including: PC, tid, file, line, and function.
|
||||||
func (thread *ThreadContext) PrintInfo() error {
|
func (thread *ThreadContext) PrintInfo() error {
|
||||||
pc, err := thread.CurrentPC()
|
pc, err := thread.CurrentPC()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user