Guest User

Untitled

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