Skip to content

Commit 4befe50

Browse files
authored
Merge pull request #2 from cs01/dev/chad/add-memory-and-variables
Dev/chad/add memory and variables
2 parents 5f4c9bc + 4e0d691 commit 4befe50

File tree

5 files changed

+622
-129
lines changed

5 files changed

+622
-129
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ Despite this list, gdbgui is quite usable in its current form
7373

7474
* ~~allow argument passing to the inferior process being debugged~~
7575
* ~~add links back to github, etc~~
76-
* escape brackets on system <includes> so they don't disappear
76+
* ~~escape brackets on system <includes> so they don't disappear~~
77+
* ~~only make gutter create/delete breakpoints, not anywhere in source file~~
78+
* ~~add ability to view/inspect variables~~
79+
* ~~add ability to view/inspect memory~~
7780
* add button to widen windows
7881
* add clear button to windows
7982
* improve toolbar styling, change color when error occurs
8083
* add preference ui elements (auto-refresh various windows after command is sent; show/hide windows as desired)
8184
* make flash of color fade out when snapping to source code lines or restoring old history
8285
* add autocompletion and documentation of all commands
83-
* add ability to view/inspect variables
84-
* add ability to view/inspect memory
85-
* only make gutter create/delete breakpoints, not anywhere in source file

gdbgui/backend.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,14 @@ def client_error(obj):
3030

3131

3232
def get_extra_files():
33+
extra_dirs = [STATIC_DIR, TEMPLATE_DIR]
3334
extra_files = []
34-
for dirname, dirs, files in os.walk(TEMPLATE_DIR):
35-
for filename in files:
36-
filename = os.path.join(dirname, filename)
37-
if os.path.isfile(filename):
38-
extra_files.append(filename)
35+
for extra_dir in extra_dirs:
36+
for dirname, dirs, files in os.walk(extra_dir):
37+
for filename in files:
38+
filename = os.path.join(dirname, filename)
39+
if os.path.isfile(filename):
40+
extra_files.append(filename)
3941
return extra_files
4042

4143

gdbgui/static/css/gdbgui.css

Lines changed: 102 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* styling for all html tags */
12
body{
23
background: #ccc;
34
color: grey;
@@ -6,55 +7,98 @@ body{
67
table{
78
font-size: 0.9em;
89
}
10+
pre{
11+
overflow: visible !important;
12+
}
13+
14+
/* styling for generic classes */
15+
.pre{
16+
white-space: pre;
17+
}
18+
.monospace{
19+
font-family: monospace;
20+
}
921
.lighttext{
1022
color: #4a4a4a;
1123
}
1224
.glyphicon{
1325
/* glyphicons are too bold, make them lighter*/
1426
color: #848484;
1527
}
28+
.flex{
29+
display: flex;
30+
}
31+
/* components get their own titlebars */
1632
.titlebar{
1733
width: 100%;
1834
color: black;
1935
background-color: white;
2036
}
21-
#console, .gdb_console{
37+
.pointer{
38+
cursor: pointer;
39+
}
40+
.gdb_content_div{
41+
overflow: auto;
42+
height: 150px;
43+
background-color: #f7f7f7;
44+
border-color: grey;
45+
border-style: solid;
46+
border-width: 1px;
47+
border-radius: 2px;
48+
}
49+
50+
/* specific styling for ids */
51+
#always_on_top{
52+
position: fixed;
53+
top: 0;
54+
margin-top: 0;
55+
height: 102px;
56+
width: 100%;
57+
border-bottom: black;
58+
border-style: solid;
59+
border-width: 0px;
60+
border-bottom-width: 1px;
61+
z-index: 1000;
62+
background: #f1f1f1;
63+
border-bottom-color: #ccc;
64+
}
65+
#console{
2266
font-size: 0.9em !important;
2367
background-color: #292929 !important;
2468
color: #f9f9f9 !important;
2569
font-family: monospace !important;
2670
}
27-
#stdout {
28-
color: black;
71+
#gdb_command{
72+
padding-left: 45px;
73+
border-top: 0;
74+
border-top-left-radius: 0;
75+
border-top-right-radius: 0;
76+
font-size: 0.9em !important;
77+
background-color: #3c3c3c !important;
78+
color: #f9f9f9 !important;
79+
font-family: monospace !important;
2980
}
30-
#console, #stdout, #gdb_mi_output{
81+
#gdb_mi_output{
3182
font-family: monospace;
3283
overflow: auto;
3384
font-size: 0.9em;
3485
}
35-
.pointer{
36-
cursor: pointer;
37-
}
3886
.sent_command:hover{
3987
/* lighten background */
40-
background-color:rgba(255,255,255,0.5)
88+
background-color:rgba(255,255,255,0.1)
4189
}
4290
.disabled {
4391
z-index: 1000;
4492
background-color: lightgrey;
4593
opacity: 0.6;
4694
pointer-events: none;
4795
}
48-
.no_margin{
96+
.margin_sm{
4997
margin: 2px;
5098
}
5199
.no_padding{
52100
padding: 2px !important;
53101
}
54-
.code{
55-
overflow: auto;
56-
font-size: 0.9em;
57-
}
58102
.code pre, table.code {
59103
margin: 0px;
60104
padding: 0px;
@@ -64,67 +108,60 @@ table{
64108
.highlight{
65109
background: rgba(255, 255, 0, 0.5);
66110
}
67-
.breakpoint td.gutter div{
68-
background: blue;
69-
width: 0.9em;
70-
height: 0.9em;
71-
border-radius: 50%;
72-
border-color: black;
73-
}
74-
.no_breakpoint td.gutter div{
75-
/*background: blue;*/
76-
width: 0.9em;
77-
height: 0.9em;
78-
border-radius: 50%;
79-
border-color: black;
111+
.line_num_container{
112+
width: 50px;
113+
border-width: 0;
114+
border-right: 1px;
115+
border-style: solid;
116+
border-color: #c7c7c7;
80117
}
81-
.active_breakpoint{
82-
background: red;
118+
.line_num{
119+
padding-left: 10px;
120+
padding-right: 10px;
121+
font-family: monospace;
122+
font-size: 0.9em;
123+
color: #ababab;
124+
cursor: pointer;
83125
}
84-
.gutter{
85-
width: 0.9em;
86-
padding-right: 5px;
87-
background: #d4ffab;
126+
/* the line number has its style changed if it has a breakpoint */
127+
.line_num.breakpoint{
128+
background: #33cdff;
129+
color: black;
130+
border-style: solid;
131+
border-color: #000000;
132+
border-width: 1px;
88133
}
89-
.pre{
90-
white-space: pre;
134+
/* set background color over souce code only */
135+
.source_code_row.line_of_code td{
136+
background-color: #f7f7f7;
91137
}
92-
pre{
93-
overflow: visible !important;
138+
.line_of_code pre{
139+
margin-left: 10px;
94140
}
95-
.source_code:hover td, .source_code:hover td pre{
141+
/* when hovering, set background color of entire row */
142+
.source_code_row:hover td, .source_code_row:hover td pre{
96143
background-color: lightblue;
97-
cursor: pointer;
98-
}
99-
.source_code td{
100-
background-color: #f7f7f7
101144
}
102145
.padding_left{
103146
padding-left: 5px;
104147
}
105148
.line_of_code{
106149
height: 18px
107150
}
108-
.gdb_content_div{
109-
overflow: auto;
110-
height: 150px;
111-
background-color: #f7f7f7;
112-
border-color: grey;
113-
border-style: solid;
114-
border-width: 1px;
115-
border-radius: 2px;
116-
}
117151
.dropdown-btn {
118152
vertical-align: top;
119153
height: 30px;
120154
border-top-left-radius: 0;
121155
border-bottom-left-radius: 0;
122156
}
157+
/* auto-complete librarie's dropdown should only be 200px high, and should
158+
have scrollbar, so it doesn't take over the page */
123159
.awesomplete ul {
124160
overflow: auto;
125161
max-height: 200px;
126162
}
127163

164+
/* show a flash of color */
128165
.flash {
129166
-webkit-animation-name: flash-animation;
130167
-webkit-animation-duration: 1.0s;
@@ -142,3 +179,18 @@ pre{
142179
from { background: yellow; }
143180
to { background: default; }
144181
}
182+
183+
#variables li{
184+
list-style: none;
185+
}
186+
187+
#variables ul.variable{
188+
padding-left: 5px;
189+
border: 0px;
190+
}
191+
#variables li:hover{
192+
background-color: #c0eeff;
193+
}
194+
.toggle_children_visibility{
195+
font-weight: bold;
196+
}

0 commit comments

Comments
 (0)