Advertisement
DavidsonDFGL

GDB tests

Nov 17th, 2019
358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. set can-use-hw-watchpoints 0
  2. set pagination off
  3. def time_cont
  4. python import time
  5. python start = time.time()
  6. c
  7. python print (time.time() - start)
  8. end
  9. tb main
  10. r
  11. b multi
  12. time_cont
  13. watch i
  14. commands
  15. cont
  16. end
  17. watch vet
  18. commands
  19. cont
  20. end
  21.  
  22.  
  23.  
  24.  
  25. set can-use-hw-watchpoints 1
  26. set pagination off
  27. def time_cont
  28. python import time
  29. python start = time.time()
  30. c
  31. python print (time.time() - start)
  32. end
  33. tb main
  34. r
  35. b multi
  36. c
  37. watch numb
  38. watch array
  39. time_cont
  40.  
  41.  
  42.  
  43.  
  44. set can-use-hw-watchpoints 0
  45. set pagination off
  46. tb main
  47. r
  48. b multi
  49. c
  50. python import time
  51. python start = time.time()
  52. watch -l numb1
  53. commands
  54. c
  55. end
  56. watch -l numb2
  57. commands
  58. c
  59. end
  60. watch -l numb3
  61. commands
  62. c
  63. end
  64. watch -l numb4
  65. commands
  66. c
  67. end
  68. watch -l numb5
  69. commands
  70. c
  71. end
  72. watch -l array
  73. commands
  74. python print (time.time() - start)
  75. end
  76. c
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85. RR
  86. ----
  87. set can-use-hw-watchpoints 0
  88. set pagination off
  89. tb main
  90. c
  91. b multi
  92. c
  93. python import time
  94. python start = time.time()
  95. watch array
  96. commands
  97. python print (time.time() - start)
  98. end
  99. c
  100.  
  101.  
  102.  
  103. GDB
  104. ----
  105.  
  106. set can-use-hw-watchpoints 0
  107. set pagination off
  108. tb main
  109. r
  110. b multi
  111. c
  112. python import time
  113. python start = time.time()
  114. watch -l array
  115. commands
  116. python print (time.time() - start)
  117. end
  118. c
  119.  
  120.  
  121.  
  122. set print array-indexes on
  123. watch array10x10
  124.  
  125.  
  126. watch var
  127.  
  128. watch -l var
  129.  
  130.  
  131.  
  132. watch *(unsigned int *)addr
  133.  
  134.  
  135. https://stackoverflow.com/questions/3206332/gdb-stops-with-too-many-watchpoints-when-there-is-only-one
  136. https://stackoverflow.com/questions/3470704/setting-gdb-hardware-watchpoint-how-to-set-software-watchpoint
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement