Permalink
Browse files

Update gdb macros

  • Loading branch information...
1 parent 823ca75 commit 46667a1b273af41ed7d72d6bd3683834e4661e54 @gnosek committed Jun 18, 2008
Showing with 6 additions and 5 deletions.
  1. +6 −5 .gdbinit
View
11 .gdbinit
@@ -4,11 +4,12 @@ define show_fair_peer
printf "upstream id: 0x%08x, current peer: %d/%d\n", $n->node.key, $peers->current, $peers->number
set $i = 0
while $i < $peers->number
- printf "peer %d: %s weight: %d/%d fails: %d/%d acc: %d down: %d nreq: %u last_act: %u\n", $i, $peers->peer[$i].name.data,\
- $peers->peer[$i].current_weight, $peers->peer[$i].weight,\
- $peers->peer[$i].fails, $peers->peer[$i].max_fails,\
- $peers->peer[$i].accessed, $peers->peer[$i].down,\
- $n->stats[$i].nreq, $n->stats[$i].last_active
+ set $peer = &$peers->peer[$i]
+ printf "peer %d: %s weight: %d/%d fails: %d/%d acc: %d down: %d nreq: %u last_act: %u\n", $i, $peer->name.data,\
+ $peer->shared->current_weight, $peer->weight,\
+ $peer->shared->fails, $peer->max_fails,\
+ $peer->accessed, $peer->down,\
+ $peer->shared->nreq, $peer->shared->last_active
set $i = $i + 1
end
printf "-----------------\n"

0 comments on commit 46667a1

Please sign in to comment.