Created
November 8, 2016 20:52
-
-
Save Elv13/48b43ead347faba1b59378267d2364e7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(gdb) python import collections;d = collections.deque(maxlen=10) | |
(gdb) set height 0 | |
(gdb) break main | |
(gdb) run | |
(gdb) watch hello_world | |
(gdb) commands | |
>python | |
>global d | |
>d.append(int(gdb.lookup_symbol("hello_world")[0].value(gdb.selected_frame()))) | |
>end | |
> continue | |
>end | |
(gdb) continue | |
(gdb) python print(d) | |
import numpy as np | |
import matplotlib.pyplot as plt | |
ind = np.arange(len(d)) | |
p1 = plt.bar(ind,xval,0.1,color='r') | |
ply.ylabel("Values") | |
plt.title("Values of hello_world") | |
plt.yticks(np.arange(0,81,10)) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment