Guest User

Untitled

a guest
Dec 6th, 2011
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Index: .gdbinit
  2. ===================================================================
  3. --- .gdbinit (revision 320474)
  4. +++ .gdbinit (working copy)
  5. @@ -39,7 +39,62 @@
  6. while $t
  7. printf "[0x%08x] ", $t
  8. if $t->function_state.function->common.function_name
  9. - printf "%s() ", $t->function_state.function->common.function_name
  10. + if $t->function_state.arguments
  11. + set $count = (int)*($t->function_state.arguments)
  12. + if $count > 0
  13. + printf "%s(", $t->function_state.function->common.function_name
  14. + while $count > 0
  15. + set $zvalue = *(zval **)($t->function_state.arguments - $count)
  16. + set $type = $zvalue->type
  17. + if $type == 0
  18. + printf "NULL"
  19. + end
  20. + if $type == 1
  21. + printf "%ld", $zvalue->value.lval
  22. + end
  23. + if $type == 2
  24. + printf "%lf", $zvalue->value.dval
  25. + end
  26. + if $type == 3
  27. + if $zvalue->value.lval
  28. + printf "true"
  29. + else
  30. + printf "false"
  31. + end
  32. + end
  33. + if $type == 4
  34. + printf "array(%d)[0x%08x]", $zvalue->value.ht->nNumOfElements, $zvalue
  35. + end
  36. + if $type == 5
  37. + printf "object[0x%08x]", $zvalue
  38. + end
  39. + if $type == 6
  40. + ____print_str $zvalue->value.str.val $zvalue->value.str.len
  41. + end
  42. + if $type == 7
  43. + printf "resource(#%d)", $zvalue->value.lval
  44. + end
  45. + if $type == 8
  46. + printf "constant"
  47. + end
  48. + if $type == 9
  49. + printf "const_array"
  50. + end
  51. + if $type > 9
  52. + printf "unknown type %d", $type
  53. + end
  54. + set $count = $count -1
  55. + if $count > 0
  56. + printf ", "
  57. + end
  58. + end
  59. + printf ") "
  60. + else
  61. + printf "%s(void) ", $t->function_state.function->common.function_name
  62. + end
  63. + else
  64. + printf "%s(void) ", $t->function_state.function->common.function_name
  65. + end
  66. else
  67. printf "??? "
  68. end
  69.  
Advertisement
Add Comment
Please, Sign In to add comment