Commit | Line | Data |
---|---|---|
f823634c SG |
1 | # Apply these patches to GDB to produce an Energize GDB. |
2 | # To apply these patches, first cd to gdb-XX/gdb, run "patch -p0 <thisfile", | |
3 | # and then Sanitize. | |
4 | ||
2bfe2c53 | 5 | cvs diff: Diffing . |
f823634c | 6 | =================================================================== |
2bfe2c53 SG |
7 | RCS file: /local/cvsfiles/devo/gdb/.Sanitize,v |
8 | retrieving revision 2.56 | |
9 | diff -c -r2.56 .Sanitize | |
10 | *** 2.56 1992/06/23 06:26:00 | |
11 | --- .Sanitize 1992/07/05 17:15:52 | |
12 | *************** | |
13 | *** 76,81 **** | |
14 | --- 76,83 ---- | |
15 | doc | |
16 | dwarfread.c | |
17 | elfread.c | |
18 | + energize | |
19 | + energize.c | |
20 | environ.c | |
21 | environ.h | |
22 | eval.c | |
23 | =================================================================== | |
24 | RCS file: /local/cvsfiles/devo/gdb/Makefile.in,v | |
25 | retrieving revision 1.161 | |
26 | diff -c -r1.161 Makefile.in | |
27 | *** 1.161 1992/07/04 13:58:24 | |
28 | --- Makefile.in 1992/07/05 17:43:37 | |
f823634c SG |
29 | *************** |
30 | *** 123,128 **** | |
2bfe2c53 | 31 | --- 123,133 ---- |
f823634c SG |
32 | READLINE_DEP = $$(READLINE_DIR) |
33 | RL_LIB = ./../readline${subdir}/libreadline.a | |
34 | ||
2bfe2c53 SG |
35 | + # Energize libraries |
36 | + ENERGIZE_DIR = ${srcdir}/energize | |
37 | + ENERGIZE_INCLUDES = -I${ENERGIZE_DIR} | |
38 | + ENERGIZE_LIBS = ${ENERGIZE_DIR}/libconn.a | |
f823634c SG |
39 | + |
40 | # All the includes used for CFLAGS and for lint. | |
41 | # -I. for config files. | |
42 | # -I${srcdir} possibly for regex.h also. | |
43 | *************** | |
2bfe2c53 | 44 | *** 155,161 **** |
f823634c SG |
45 | # {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs. |
46 | # TERMCAP comes after readline, since readline depends on it. | |
47 | CLIBS = ${BFD_LIB} ${RL_LIB} ${TERMCAP} ${MMALLOC_LIB} ${LIBIBERTY} \ | |
48 | ! ${XM_CLIBS} ${TM_CLIBS} | |
49 | CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${BFD_LIB} ${MMALLOC_LIB} ${LIBIBERTY} \ | |
50 | ${RL_LIB} ${MMALLOC_LIB} | |
51 | ||
2bfe2c53 | 52 | --- 160,166 ---- |
f823634c SG |
53 | # {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs. |
54 | # TERMCAP comes after readline, since readline depends on it. | |
55 | CLIBS = ${BFD_LIB} ${RL_LIB} ${TERMCAP} ${MMALLOC_LIB} ${LIBIBERTY} \ | |
2bfe2c53 | 56 | ! ${XM_CLIBS} ${TM_CLIBS} ${ENERGIZE_LIBS} |
f823634c SG |
57 | CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${BFD_LIB} ${MMALLOC_LIB} ${LIBIBERTY} \ |
58 | ${RL_LIB} ${MMALLOC_LIB} | |
59 | ||
f823634c SG |
60 | *************** |
61 | *** 176,182 **** | |
62 | # demangling. For other demangling styles, such as the Annotated C++ | |
63 | # Reference Manual (section 7.2.1c) style, set this define in the target- | |
64 | # dependent makefile fragment. | |
65 | ! DEMANGLE_OPTS= | |
66 | ||
67 | # Host and target-dependent makefile fragments come in here. | |
68 | #### | |
2bfe2c53 | 69 | --- 181,192 ---- |
f823634c SG |
70 | # demangling. For other demangling styles, such as the Annotated C++ |
71 | # Reference Manual (section 7.2.1c) style, set this define in the target- | |
72 | # dependent makefile fragment. | |
73 | ! # | |
74 | ! # For Energize, default to using style specified in the Annotated C++ | |
75 | ! # Reference Manual, section 7.2.1c, which is what is used by the Lucid C++ | |
76 | ! # compiler for most things. But there are places where Lucid varies from | |
77 | ! # the ARM, so select the Lucid specific code also. | |
78 | ! DEMANGLE_OPTS=-DARM_DEMANGLING -DLUCID_DEMANGLING | |
79 | ||
80 | # Host and target-dependent makefile fragments come in here. | |
81 | #### | |
82 | *************** | |
83 | *** 194,200 **** | |
84 | ${DEMANGLER}.c mem-break.c target.c inftarg.c \ | |
85 | dbxread.c coffread.c elfread.c dwarfread.c xcoffread.c \ | |
86 | ieee-float.c language.c parse.c buildsym.c objfiles.c \ | |
87 | ! minsyms.c mipsread.c | |
88 | ||
89 | # Source files in subdirectories (which will be handled separately by | |
90 | # 'make gdb.tar.Z'). | |
2bfe2c53 | 91 | --- 204,210 ---- |
f823634c SG |
92 | ${DEMANGLER}.c mem-break.c target.c inftarg.c \ |
93 | dbxread.c coffread.c elfread.c dwarfread.c xcoffread.c \ | |
94 | ieee-float.c language.c parse.c buildsym.c objfiles.c \ | |
2bfe2c53 | 95 | ! minsyms.c mipsread.c energize.c |
f823634c SG |
96 | |
97 | # Source files in subdirectories (which will be handled separately by | |
98 | # 'make gdb.tar.Z'). | |
99 | *************** | |
2bfe2c53 | 100 | *** 280,286 **** |
f823634c SG |
101 | command.o utils.o expprint.o environ.o version.o gdbtypes.o \ |
102 | copying.o $(DEPFILES) ${DEMANGLER}.o mem-break.o target.o \ | |
103 | inftarg.o ieee-float.o putenv.o parse.o language.o $(YYOBJ) \ | |
104 | ! buildsym.o objfiles.o minsyms.o \ | |
105 | dbxread.o coffread.o elfread.o dwarfread.o xcoffread.o mipsread.o | |
106 | ||
107 | RAPP_OBS = rgdb.o rudp.o rserial.o serial.o udp.o $(XDEPFILES) | |
2bfe2c53 | 108 | --- 290,296 ---- |
f823634c SG |
109 | command.o utils.o expprint.o environ.o version.o gdbtypes.o \ |
110 | copying.o $(DEPFILES) ${DEMANGLER}.o mem-break.o target.o \ | |
111 | inftarg.o ieee-float.o putenv.o parse.o language.o $(YYOBJ) \ | |
2bfe2c53 | 112 | ! buildsym.o objfiles.o minsyms.o energize.o \ |
f823634c SG |
113 | dbxread.o coffread.o elfread.o dwarfread.o xcoffread.o mipsread.o |
114 | ||
115 | RAPP_OBS = rgdb.o rudp.o rserial.o serial.o udp.o $(XDEPFILES) | |
116 | *************** | |
2bfe2c53 | 117 | *** 293,299 **** |
f823634c SG |
118 | |
119 | NTSSTART = kdb-start.o | |
120 | ||
121 | ! SUBDIRS = doc | |
122 | ||
123 | # For now, shortcut the "configure GDB for fewer languages" stuff. | |
124 | YYFILES = c-exp.tab.c m2-exp.tab.c | |
2bfe2c53 | 125 | --- 303,309 ---- |
f823634c SG |
126 | |
127 | NTSSTART = kdb-start.o | |
128 | ||
2bfe2c53 | 129 | ! SUBDIRS = doc ${ENERGIZE_DIR} |
f823634c SG |
130 | |
131 | # For now, shortcut the "configure GDB for fewer languages" stuff. | |
132 | YYFILES = c-exp.tab.c m2-exp.tab.c | |
133 | *************** | |
2bfe2c53 SG |
134 | *** 347,352 **** |
135 | --- 357,376 ---- | |
f823634c SG |
136 | #load `echo " "$(DEPFILES) | sed -e 's/\.o/.c/g' -e 's, , ../,g'` |
137 | echo "Load .c corresponding to:" $(DEPFILES) | |
138 | ||
2bfe2c53 SG |
139 | + ${ENERGIZE_LIB} : |
140 | + @(cd ${ENERGIZE_DIR}; \ | |
f823634c SG |
141 | + $(MAKE) \ |
142 | + "against=$(against)" \ | |
143 | + "AR=$(AR)" \ | |
144 | + "AR_FLAGS=$(AR_FLAGS)" \ | |
145 | + "CC=$(CC)" \ | |
146 | + "CFLAGS=$(CFLAGS)" \ | |
147 | + "RANLIB=$(RANLIB)" \ | |
148 | + "MAKEINFO=$(MAKEINFO)" \ | |
149 | + "INSTALL=$(INSTALL)" \ | |
150 | + "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ | |
151 | + "INSTALL_DATA=$(INSTALL_DATA)" \ | |
152 | + "BISON=$(BISON)") | |
153 | ||
154 | # This is useful when debugging GDB, because some Unix's don't let you run GDB | |
155 | # on itself without copying the executable. So "make gdb1" will make | |
156 | *************** | |
2bfe2c53 SG |
157 | *** 695,700 **** |
158 | --- 719,727 ---- | |
f823634c SG |
159 | |
160 | ttyflush.o: ${srcdir}/nindy-share/ttyflush.c | |
161 | ${CC} -c ${INTERNAL_CFLAGS} ${srcdir}/nindy-share/ttyflush.c | |
162 | + | |
2bfe2c53 SG |
163 | + energize.o: ${srcdir}/energize.c |
164 | + ${CC} -c ${INTERNAL_CFLAGS} ${ENERGIZE_INCLUDES} ${srcdir}/energize.c | |
f823634c SG |
165 | |
166 | lint: $(LINTFILES) | |
167 | $(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES) \ | |
2bfe2c53 SG |
168 | =================================================================== |
169 | RCS file: /local/cvsfiles/devo/gdb/breakpoint.c,v | |
170 | retrieving revision 1.38 | |
171 | diff -c -r1.38 breakpoint.c | |
172 | *** 1.38 1992/07/04 03:20:43 | |
173 | --- breakpoint.c 1992/07/05 13:37:46 | |
f823634c SG |
174 | *************** |
175 | *** 273,278 **** | |
2bfe2c53 | 176 | --- 273,279 ---- |
f823634c SG |
177 | b->cond_string = NULL; |
178 | if (from_tty) | |
179 | printf_filtered ("Breakpoint %d now unconditional.\n", bnum); | |
2bfe2c53 | 180 | + energize_condition_breakpoint(b); |
f823634c SG |
181 | } |
182 | else | |
183 | { | |
184 | *************** | |
185 | *** 281,286 **** | |
2bfe2c53 | 186 | --- 282,288 ---- |
f823634c SG |
187 | typed in or the decompiled expression. */ |
188 | b->cond_string = savestring (arg, strlen (arg)); | |
189 | b->cond = parse_exp_1 (&arg, block_for_pc (b->address), 0); | |
2bfe2c53 | 190 | + energize_condition_breakpoint(b); |
f823634c SG |
191 | if (*arg) |
192 | error ("Junk at end of expression"); | |
193 | } | |
194 | *************** | |
195 | *** 316,330 **** | |
196 | ALL_BREAKPOINTS (b) | |
197 | if (b->number == bnum) | |
198 | { | |
199 | ! if (from_tty && input_from_terminal_p ()) | |
200 | ! { | |
201 | ! printf_filtered ("Type commands for when breakpoint %d is hit, one per line.\n\ | |
202 | End with a line saying just \"end\".\n", bnum); | |
203 | - fflush (stdout); | |
204 | - } | |
205 | l = read_command_lines (); | |
206 | free_command_lines (&b->commands); | |
207 | b->commands = l; | |
208 | return; | |
209 | } | |
210 | error ("No breakpoint number %d.", bnum); | |
2bfe2c53 | 211 | --- 318,330 ---- |
f823634c SG |
212 | ALL_BREAKPOINTS (b) |
213 | if (b->number == bnum) | |
214 | { | |
2bfe2c53 | 215 | ! if ((from_tty && input_from_terminal_p ()) || energize) |
f823634c SG |
216 | ! printf_filtered ("Type commands for when breakpoint %d is hit, one per line.\n\ |
217 | End with a line saying just \"end\".\n", bnum); | |
218 | l = read_command_lines (); | |
219 | free_command_lines (&b->commands); | |
220 | b->commands = l; | |
2bfe2c53 | 221 | + energize_commands_breakpoint(b); |
f823634c SG |
222 | return; |
223 | } | |
224 | error ("No breakpoint number %d.", bnum); | |
225 | *************** | |
226 | *** 925,930 **** | |
2bfe2c53 | 227 | --- 925,931 ---- |
f823634c SG |
228 | { |
229 | b->ignore_count--; | |
230 | this_bp_stop = 0; | |
2bfe2c53 | 231 | + energize_ignore_breakpoint(b); |
f823634c SG |
232 | } |
233 | else | |
234 | { | |
235 | *************** | |
236 | *** 1365,1370 **** | |
2bfe2c53 | 237 | --- 1366,1373 ---- |
f823634c SG |
238 | mention (b) |
239 | struct breakpoint *b; | |
240 | { | |
2bfe2c53 | 241 | + energize_create_breakpoint(b); |
f823634c SG |
242 | + |
243 | switch (b->type) | |
244 | { | |
245 | case bp_watchpoint: | |
246 | *************** | |
2bfe2c53 SG |
247 | *** 2112,2117 **** |
248 | --- 2115,2122 ---- | |
f823634c SG |
249 | register struct breakpoint *b; |
250 | register bpstat bs; | |
251 | ||
2bfe2c53 | 252 | + energize_delete_breakpoint(bpt); |
f823634c SG |
253 | + |
254 | if (bpt->inserted) | |
255 | target_remove_breakpoint(bpt->address, bpt->shadow_contents); | |
256 | ||
257 | *************** | |
2bfe2c53 SG |
258 | *** 2283,2288 **** |
259 | --- 2288,2294 ---- | |
f823634c SG |
260 | if (b->number == bptnum) |
261 | { | |
262 | b->ignore_count = count; | |
2bfe2c53 | 263 | + energize_ignore_breakpoint(b); |
f823634c SG |
264 | if (!from_tty) |
265 | return; | |
266 | else if (count == 0) | |
267 | *************** | |
2bfe2c53 | 268 | *** 2307,2313 **** |
f823634c SG |
269 | struct breakpoint *b; |
270 | ||
271 | ALL_BREAKPOINTS (b) | |
272 | ! b->ignore_count = 0; | |
273 | } | |
274 | ||
275 | /* Command to set ignore-count of breakpoint N to COUNT. */ | |
2bfe2c53 | 276 | --- 2313,2322 ---- |
f823634c SG |
277 | struct breakpoint *b; |
278 | ||
279 | ALL_BREAKPOINTS (b) | |
280 | ! { | |
281 | ! b->ignore_count = 0; | |
2bfe2c53 | 282 | ! energize_ignore_breakpoint(b); |
f823634c SG |
283 | ! } |
284 | } | |
285 | ||
286 | /* Command to set ignore-count of breakpoint N to COUNT. */ | |
287 | *************** | |
2bfe2c53 SG |
288 | *** 2374,2379 **** |
289 | --- 2383,2390 ---- | |
f823634c SG |
290 | { |
291 | bpt->enable = enabled; | |
292 | ||
2bfe2c53 | 293 | + energize_enable_breakpoint(bpt); |
f823634c SG |
294 | + |
295 | if (xgdb_verbose && bpt->type == bp_breakpoint) | |
296 | printf ("breakpoint #%d enabled\n", bpt->number); | |
297 | ||
298 | *************** | |
2bfe2c53 SG |
299 | *** 2421,2426 **** |
300 | --- 2432,2439 ---- | |
f823634c SG |
301 | disable_breakpoint (bpt) |
302 | struct breakpoint *bpt; | |
303 | { | |
2bfe2c53 | 304 | + energize_disable_breakpoint(bpt); |
f823634c SG |
305 | + |
306 | bpt->enable = disabled; | |
307 | ||
308 | if (xgdb_verbose && bpt->type == bp_breakpoint) | |
2bfe2c53 SG |
309 | =================================================================== |
310 | RCS file: /local/cvsfiles/devo/gdb/command.c,v | |
311 | retrieving revision 1.17 | |
312 | diff -c -r1.17 command.c | |
313 | *** 1.17 1992/07/04 03:20:54 | |
314 | --- command.c 1992/07/05 13:41:51 | |
f823634c SG |
315 | *************** |
316 | *** 1149,1155 **** | |
317 | } | |
318 | ||
319 | if (pid != -1) | |
320 | ! while ((rc = wait (&status)) != pid && rc != -1) | |
321 | ; | |
322 | else | |
323 | error ("Fork failed"); | |
324 | --- 1149,1155 ---- | |
325 | } | |
326 | ||
327 | if (pid != -1) | |
2bfe2c53 | 328 | ! while ((rc = energize_wait (&status)) != pid && rc != -1) |
f823634c SG |
329 | ; |
330 | else | |
331 | error ("Fork failed"); | |
2bfe2c53 SG |
332 | =================================================================== |
333 | RCS file: /local/cvsfiles/devo/gdb/configure.in,v | |
334 | retrieving revision 1.50 | |
335 | diff -c -r1.50 configure.in | |
336 | *** 1.50 1992/06/23 00:25:00 | |
337 | --- configure.in 1992/07/05 17:50:08 | |
f823634c SG |
338 | *************** |
339 | *** 1,4 **** | |
340 | ! configdirs="doc" | |
341 | srcname="GDB" | |
342 | srctrigger=main.c | |
343 | target_dependent=true | |
344 | --- 1,4 ---- | |
2bfe2c53 | 345 | ! configdirs="energize doc" |
f823634c SG |
346 | srcname="GDB" |
347 | srctrigger=main.c | |
348 | target_dependent=true | |
2bfe2c53 SG |
349 | =================================================================== |
350 | RCS file: /local/cvsfiles/devo/gdb/defs.h,v | |
351 | retrieving revision 1.41 | |
352 | diff -c -r1.41 defs.h | |
353 | *** 1.41 1992/06/30 08:53:18 | |
354 | --- defs.h 1992/07/05 13:24:31 | |
355 | *************** | |
356 | *** 787,790 **** | |
357 | --- 787,792 ---- | |
f823634c SG |
358 | extern CORE_ADDR |
359 | push_word (); | |
360 | ||
2bfe2c53 | 361 | + #include "energize.h" |
f823634c SG |
362 | + |
363 | #endif /* !defined (DEFS_H) */ | |
2bfe2c53 SG |
364 | =================================================================== |
365 | RCS file: /local/cvsfiles/devo/gdb/inflow.c,v | |
366 | retrieving revision 1.27 | |
367 | diff -c -r1.27 inflow.c | |
368 | *** 1.27 1992/07/04 03:21:21 | |
369 | --- inflow.c 1992/07/05 12:58:31 | |
f823634c SG |
370 | *************** |
371 | *** 81,87 **** | |
372 | static short pgrp_inferior; | |
373 | static short pgrp_ours; | |
374 | # else /* not def SHORT_PGRP */ | |
375 | ! static int pgrp_inferior; | |
376 | static int pgrp_ours; | |
377 | # endif /* not def SHORT_PGRP */ | |
378 | #else /* not def TIOCGPGRP */ | |
379 | --- 81,87 ---- | |
380 | static short pgrp_inferior; | |
381 | static short pgrp_ours; | |
382 | # else /* not def SHORT_PGRP */ | |
383 | ! int pgrp_inferior; | |
384 | static int pgrp_ours; | |
385 | # endif /* not def SHORT_PGRP */ | |
386 | #else /* not def TIOCGPGRP */ | |
2bfe2c53 SG |
387 | =================================================================== |
388 | RCS file: /local/cvsfiles/devo/gdb/infrun.c,v | |
389 | retrieving revision 1.52 | |
390 | diff -c -r1.52 infrun.c | |
391 | *** 1.52 1992/07/04 03:21:24 | |
392 | --- infrun.c 1992/07/05 13:46:46 | |
f823634c SG |
393 | *************** |
394 | *** 617,622 **** | |
2bfe2c53 | 395 | --- 617,623 ---- |
f823634c SG |
396 | Here we must get it up to actual execution of the real program. */ |
397 | ||
398 | inferior_pid = pid; /* Needed for wait_for_inferior stuff below */ | |
2bfe2c53 | 399 | + energize_new_process(); |
f823634c SG |
400 | |
401 | clear_proceed_status (); | |
402 | ||
403 | *************** | |
404 | *** 755,760 **** | |
2bfe2c53 | 405 | --- 756,762 ---- |
f823634c SG |
406 | |
407 | attach (pid); | |
408 | inferior_pid = pid; | |
2bfe2c53 | 409 | + energize_new_process(); |
f823634c SG |
410 | push_target (&child_ops); |
411 | ||
412 | mark_breakpoints_out (); | |
2bfe2c53 SG |
413 | =================================================================== |
414 | RCS file: /local/cvsfiles/devo/gdb/inftarg.c,v | |
415 | retrieving revision 1.11 | |
416 | diff -c -r1.11 inftarg.c | |
417 | *** 1.11 1992/03/29 23:21:27 | |
418 | --- inftarg.c 1992/07/05 13:48:05 | |
f823634c SG |
419 | *************** |
420 | *** 58,64 **** | |
421 | #ifdef USE_PROC_FS | |
422 | pid = proc_wait (status); | |
423 | #else | |
424 | ! pid = wait (status); | |
425 | #endif | |
426 | if (pid == -1) /* No more children to wait for */ | |
427 | { | |
2bfe2c53 | 428 | --- 58,64 ---- |
f823634c SG |
429 | #ifdef USE_PROC_FS |
430 | pid = proc_wait (status); | |
431 | #else | |
2bfe2c53 | 432 | ! pid = energize_wait (status); |
f823634c SG |
433 | #endif |
434 | if (pid == -1) /* No more children to wait for */ | |
435 | { | |
2bfe2c53 SG |
436 | =================================================================== |
437 | RCS file: /local/cvsfiles/devo/gdb/main.c,v | |
438 | retrieving revision 1.49 | |
439 | diff -c -r1.49 main.c | |
440 | *** 1.49 1992/07/04 12:20:57 | |
441 | --- main.c 1992/07/05 14:08:32 | |
f823634c SG |
442 | *************** |
443 | *** 397,402 **** | |
444 | --- 397,403 ---- | |
445 | char *corearg = NULL; | |
446 | char *cdarg = NULL; | |
447 | char *ttyarg = NULL; | |
2bfe2c53 | 448 | + char *energize_id = NULL; |
f823634c SG |
449 | |
450 | /* Pointers to all arguments of +command option. */ | |
451 | char **cmdarg; | |
452 | *************** | |
2bfe2c53 SG |
453 | *** 495,500 **** |
454 | --- 496,502 ---- | |
f823634c SG |
455 | {"tty", required_argument, 0, 't'}, |
456 | {"baud", required_argument, 0, 'b'}, | |
457 | {"b", required_argument, 0, 'b'}, | |
458 | + {"context", required_argument, 0, 12}, | |
459 | /* Allow machine descriptions to add more options... */ | |
460 | #ifdef ADDITIONAL_OPTIONS | |
461 | ADDITIONAL_OPTIONS | |
462 | *************** | |
2bfe2c53 SG |
463 | *** 527,532 **** |
464 | --- 529,537 ---- | |
f823634c SG |
465 | case 11: |
466 | cdarg = optarg; | |
467 | break; | |
468 | + case 12: | |
2bfe2c53 | 469 | + energize_id = optarg; |
f823634c SG |
470 | + break; |
471 | case 's': | |
472 | symarg = optarg; | |
473 | break; | |
474 | *************** | |
2bfe2c53 SG |
475 | *** 707,712 **** |
476 | --- 712,719 ---- | |
f823634c SG |
477 | free ((PTR)dirarg); |
478 | do_cleanups (ALL_CLEANUPS); | |
479 | ||
2bfe2c53 | 480 | + energize_initialize (energize_id, execarg); |
f823634c SG |
481 | + |
482 | if (execarg != NULL | |
483 | && symarg != NULL | |
484 | && strcmp (execarg, symarg) == 0) | |
485 | *************** | |
2bfe2c53 | 486 | *** 821,827 **** |
f823634c SG |
487 | if (!setjmp (to_top_level)) |
488 | { | |
489 | do_cleanups (ALL_CLEANUPS); /* Do complete cleanup */ | |
490 | ! command_loop (); | |
491 | quit_command ((char *)0, instream == stdin); | |
492 | } | |
493 | } | |
2bfe2c53 | 494 | --- 828,837 ---- |
f823634c SG |
495 | if (!setjmp (to_top_level)) |
496 | { | |
497 | do_cleanups (ALL_CLEANUPS); /* Do complete cleanup */ | |
2bfe2c53 SG |
498 | ! if (energize) |
499 | ! energize_main_loop(); | |
f823634c SG |
500 | ! else |
501 | ! command_loop (); | |
502 | quit_command ((char *)0, instream == stdin); | |
503 | } | |
504 | } | |
505 | *************** | |
2bfe2c53 | 506 | *** 883,889 **** |
f823634c SG |
507 | else if (c->function.cfunc == NO_FUNCTION) |
508 | error ("That is not a command, just a help topic."); | |
509 | else | |
510 | ! (*c->function.cfunc) (arg, from_tty & caution); | |
511 | } | |
512 | ||
513 | /* Tell the user if the language has changed (except first time). */ | |
2bfe2c53 | 514 | --- 893,899 ---- |
f823634c SG |
515 | else if (c->function.cfunc == NO_FUNCTION) |
516 | error ("That is not a command, just a help topic."); | |
517 | else | |
2bfe2c53 | 518 | ! energize_call_command (c, arg, from_tty & caution); |
f823634c SG |
519 | } |
520 | ||
521 | /* Tell the user if the language has changed (except first time). */ | |
522 | *************** | |
2bfe2c53 | 523 | *** 1519,1525 **** |
f823634c SG |
524 | while (1) |
525 | { | |
526 | dont_repeat (); | |
527 | ! p = command_line_input ((char *) NULL, instream == stdin); | |
528 | if (p == NULL) | |
529 | /* Treat end of file like "end". */ | |
530 | break; | |
2bfe2c53 | 531 | --- 1529,1535 ---- |
f823634c SG |
532 | while (1) |
533 | { | |
534 | dont_repeat (); | |
2bfe2c53 | 535 | ! p = energize_command_line_input ((char *) NULL, instream == stdin); |
f823634c SG |
536 | if (p == NULL) |
537 | /* Treat end of file like "end". */ | |
538 | break; | |
539 | *************** | |
2bfe2c53 | 540 | *** 1823,1829 **** |
f823634c SG |
541 | void |
542 | print_prompt () | |
543 | { | |
544 | ! printf ("%s", prompt); | |
545 | fflush (stdout); | |
546 | } | |
547 | \f | |
2bfe2c53 | 548 | --- 1833,1839 ---- |
f823634c SG |
549 | void |
550 | print_prompt () | |
551 | { | |
552 | ! printf_filtered ("%s", prompt); | |
553 | fflush (stdout); | |
554 | } | |
555 | \f | |
2bfe2c53 SG |
556 | =================================================================== |
557 | RCS file: /local/cvsfiles/devo/gdb/printcmd.c,v | |
558 | retrieving revision 1.29 | |
559 | diff -c -r1.29 printcmd.c | |
560 | *** 1.29 1992/06/25 10:58:47 | |
561 | --- printcmd.c 1992/07/05 14:09:25 | |
f823634c SG |
562 | *************** |
563 | *** 778,783 **** | |
564 | --- 778,792 ---- | |
565 | { | |
566 | int histindex = record_latest_value (val); | |
567 | ||
2bfe2c53 | 568 | + if (energize) |
f823634c SG |
569 | + { |
570 | + char buf[20]; | |
571 | + | |
572 | + sprintf(buf, "$%d", histindex); | |
2bfe2c53 | 573 | + energize_start_variable_annotation(buf, NULL, VALUE_TYPE(val), |
f823634c SG |
574 | + VALUE_ADDRESS(val), ""); |
575 | + } | |
576 | + | |
577 | if (inspect) | |
578 | printf ("\031(gdb-makebuffer \"%s\" %d '(\"", exp, histindex); | |
579 | else | |
580 | *************** | |
581 | *** 784,789 **** | |
2bfe2c53 | 582 | --- 793,799 ---- |
f823634c SG |
583 | if (histindex >= 0) printf_filtered ("$%d = ", histindex); |
584 | ||
585 | print_formatted (val, format, fmt.size); | |
2bfe2c53 | 586 | + energize_end_variable_annotation(); |
f823634c SG |
587 | printf_filtered ("\n"); |
588 | if (inspect) | |
589 | printf("\") )\030"); | |
590 | *************** | |
591 | *** 1610,1620 **** | |
2bfe2c53 | 592 | --- 1620,1638 ---- |
f823634c SG |
593 | standard indentation here is 4 spaces, and val_print indents |
594 | 2 for each recurse. */ | |
595 | val = read_var_value (sym, FRAME_INFO_ID (fi)); | |
596 | + | |
2bfe2c53 SG |
597 | + energize_start_variable_annotation(SYMBOL_NAME(sym), sym, |
598 | + VALUE_TYPE(val), | |
599 | + VALUE_ADDRESS(val), ""); | |
f823634c SG |
600 | + |
601 | if (val) | |
602 | val_print (VALUE_TYPE (val), VALUE_CONTENTS (val), VALUE_ADDRESS (val), | |
603 | stream, 0, 0, 2, Val_no_prettyprint); | |
604 | else | |
605 | fputs_filtered ("???", stream); | |
606 | + | |
2bfe2c53 | 607 | + energize_end_variable_annotation(); |
f823634c SG |
608 | + |
609 | first = 0; | |
610 | } | |
611 | ||
2bfe2c53 SG |
612 | =================================================================== |
613 | RCS file: /local/cvsfiles/devo/gdb/stack.c,v | |
614 | retrieving revision 1.33 | |
615 | diff -c -r1.33 stack.c | |
616 | *** 1.33 1992/07/04 03:21:45 | |
617 | --- stack.c 1992/07/05 14:13:23 | |
f823634c SG |
618 | *************** |
619 | *** 159,165 **** | |
620 | if (addressprint) | |
621 | printf_filtered ("%s in ", local_hex_string(fi->pc)); | |
622 | ||
623 | ! fputs_demangled (fname, stdout, 0); | |
624 | fputs_filtered (" (...)\n", stdout); | |
625 | ||
626 | return; | |
627 | --- 159,168 ---- | |
628 | if (addressprint) | |
629 | printf_filtered ("%s in ", local_hex_string(fi->pc)); | |
630 | ||
2bfe2c53 SG |
631 | ! if (energize) |
632 | ! energize_annotate_function(fname, 0, level); | |
f823634c SG |
633 | ! else |
634 | ! fputs_demangled (fname, stdout, 0); | |
635 | fputs_filtered (" (...)\n", stdout); | |
636 | ||
637 | return; | |
638 | *************** | |
639 | *** 218,224 **** | |
640 | if (addressprint) | |
641 | if (fi->pc != sal.pc || !sal.symtab) | |
642 | printf_filtered ("%s in ", local_hex_string(fi->pc)); | |
643 | ! fputs_demangled (funname ? funname : "??", stdout, 0); | |
644 | wrap_here (" "); | |
645 | fputs_filtered (" (", stdout); | |
646 | if (args) | |
647 | --- 221,230 ---- | |
648 | if (addressprint) | |
649 | if (fi->pc != sal.pc || !sal.symtab) | |
650 | printf_filtered ("%s in ", local_hex_string(fi->pc)); | |
2bfe2c53 SG |
651 | ! if (energize) |
652 | ! energize_annotate_function(funname ? funname : "??", 0, level); | |
f823634c SG |
653 | ! else |
654 | ! fputs_demangled (funname ? funname : "??", stdout, 0); | |
655 | wrap_here (" "); | |
656 | fputs_filtered (" (", stdout); | |
657 | if (args) | |
658 | *************** | |
659 | *** 255,261 **** | |
660 | { | |
661 | if (addressprint && mid_statement) | |
662 | printf_filtered ("%s\t", local_hex_string(fi->pc)); | |
663 | ! print_source_lines (sal.symtab, sal.line, sal.line + 1, 0); | |
664 | } | |
665 | current_source_line = max (sal.line - lines_to_list/2, 1); | |
666 | } | |
667 | --- 261,268 ---- | |
668 | { | |
669 | if (addressprint && mid_statement) | |
670 | printf_filtered ("%s\t", local_hex_string(fi->pc)); | |
2bfe2c53 | 671 | ! if (!energize) |
f823634c SG |
672 | ! print_source_lines (sal.symtab, sal.line, sal.line + 1, 0); |
673 | } | |
674 | current_source_line = max (sal.line - lines_to_list/2, 1); | |
675 | } | |
676 | *************** | |
677 | *** 429,435 **** | |
678 | if (funname) | |
679 | { | |
680 | printf_filtered (" in "); | |
681 | ! fputs_demangled (funname, stdout, DMGL_ANSI | DMGL_PARAMS); | |
682 | } | |
683 | wrap_here (" "); | |
684 | if (sal.symtab) | |
685 | --- 436,446 ---- | |
686 | if (funname) | |
687 | { | |
688 | printf_filtered (" in "); | |
2bfe2c53 SG |
689 | ! if (energize) |
690 | ! energize_annotate_function(funname, DMGL_ANSI | DMGL_PARAMS, | |
691 | ! selected_frame_level); | |
f823634c SG |
692 | ! else |
693 | ! fputs_demangled (funname, stdout, DMGL_ANSI | DMGL_PARAMS); | |
694 | } | |
695 | wrap_here (" "); | |
696 | if (sal.symtab) | |
2bfe2c53 SG |
697 | =================================================================== |
698 | RCS file: /local/cvsfiles/devo/gdb/symfile.c,v | |
699 | retrieving revision 1.55 | |
700 | diff -c -r1.55 symfile.c | |
701 | *** 1.55 1992/07/04 13:58:46 | |
702 | --- symfile.c 1992/07/05 14:14:12 | |
703 | *************** | |
704 | *** 611,616 **** | |
705 | --- 611,618 ---- | |
f823634c SG |
706 | fflush (stdout); |
707 | } | |
708 | ||
2bfe2c53 | 709 | + energize_symbol_file(objfile); |
f823634c SG |
710 | + |
711 | return (objfile); | |
712 | } | |
713 | ||
2bfe2c53 SG |
714 | =================================================================== |
715 | RCS file: /local/cvsfiles/devo/gdb/utils.c,v | |
716 | retrieving revision 1.53 | |
717 | diff -c -r1.53 utils.c | |
718 | *** 1.53 1992/07/04 03:21:59 | |
719 | --- utils.c 1992/07/05 17:32:13 | |
f823634c SG |
720 | *************** |
721 | *** 694,700 **** | |
722 | register int ans2; | |
723 | ||
724 | /* Automatically answer "yes" if input is not from a terminal. */ | |
725 | ! if (!input_from_terminal_p ()) | |
726 | return 1; | |
727 | ||
728 | while (1) | |
2bfe2c53 | 729 | --- 694,700 ---- |
f823634c SG |
730 | register int ans2; |
731 | ||
732 | /* Automatically answer "yes" if input is not from a terminal. */ | |
2bfe2c53 | 733 | ! if (!input_from_terminal_p () && !energize) |
f823634c SG |
734 | return 1; |
735 | ||
736 | while (1) | |
737 | *************** | |
738 | *** 701,721 **** | |
739 | { | |
740 | va_start (args); | |
741 | ctlstr = va_arg (args, char *); | |
742 | vfprintf_filtered (stdout, ctlstr, args); | |
743 | - va_end (args); | |
744 | printf_filtered ("(y or n) "); | |
745 | ! fflush (stdout); | |
746 | ! answer = fgetc (stdin); | |
747 | ! clearerr (stdin); /* in case of C-d */ | |
748 | ! if (answer == EOF) /* C-d */ | |
749 | ! return 1; | |
750 | ! if (answer != '\n') /* Eat rest of input line, to EOF or newline */ | |
751 | ! do | |
752 | ! { | |
753 | ! ans2 = fgetc (stdin); | |
754 | ! clearerr (stdin); | |
755 | ! } | |
756 | ! while (ans2 != EOF && ans2 != '\n'); | |
757 | if (answer >= 'a') | |
758 | answer -= 040; | |
759 | if (answer == 'Y') | |
2bfe2c53 | 760 | --- 701,732 ---- |
f823634c SG |
761 | { |
762 | va_start (args); | |
763 | ctlstr = va_arg (args, char *); | |
2bfe2c53 | 764 | + energize_query (ctlstr, args); |
f823634c SG |
765 | vfprintf_filtered (stdout, ctlstr, args); |
766 | printf_filtered ("(y or n) "); | |
2bfe2c53 | 767 | ! if (energize) |
f823634c SG |
768 | ! { |
769 | ! char *buf; | |
770 | ! | |
2bfe2c53 | 771 | ! buf = energize_command_line_input(0, 0); |
f823634c | 772 | ! answer = buf ? *buf : 'Y'; |
2bfe2c53 | 773 | ! energize_acknowledge_query(buf); |
f823634c SG |
774 | ! } |
775 | ! else | |
776 | ! { | |
777 | ! fflush (stdout); | |
778 | ! answer = fgetc (stdin); | |
779 | ! clearerr (stdin); /* in case of C-d */ | |
780 | ! if (answer == EOF) /* C-d */ | |
781 | ! return 1; | |
782 | ! if (answer != '\n') /* Eat rest of input line, to EOF or newline */ | |
783 | ! do | |
784 | ! { | |
785 | ! ans2 = fgetc (stdin); | |
786 | ! clearerr (stdin); | |
787 | ! } | |
788 | ! while (ans2 != EOF && ans2 != '\n'); | |
789 | ! } | |
790 | if (answer >= 'a') | |
791 | answer -= 040; | |
792 | if (answer == 'Y') | |
793 | *************** | |
794 | *** 723,728 **** | |
2bfe2c53 | 795 | --- 734,740 ---- |
f823634c SG |
796 | if (answer == 'N') |
797 | return 0; | |
798 | printf_filtered ("Please answer y or n.\n"); | |
799 | + va_end (args); | |
800 | } | |
801 | } | |
802 | ||
803 | *************** | |
804 | *** 989,994 **** | |
2bfe2c53 | 805 | --- 1001,1012 ---- |
f823634c SG |
806 | if (linebuffer == 0) |
807 | return; | |
808 | ||
2bfe2c53 | 809 | + if (energize) |
f823634c | 810 | + { |
2bfe2c53 | 811 | + energize_fputs(linebuffer); |
f823634c SG |
812 | + return; |
813 | + } | |
814 | + | |
815 | /* Don't do any filtering if it is disabled. */ | |
816 | if (stream != stdout | |
817 | || (lines_per_page == UINT_MAX && chars_per_line == UINT_MAX)) | |
2bfe2c53 SG |
818 | =================================================================== |
819 | RCS file: /local/cvsfiles/devo/gdb/valprint.c,v | |
820 | retrieving revision 1.45 | |
821 | diff -c -r1.45 valprint.c | |
822 | *** 1.45 1992/07/04 03:22:04 | |
823 | --- valprint.c 1992/07/05 14:19:51 | |
f823634c SG |
824 | *************** |
825 | *** 485,490 **** | |
826 | --- 485,491 ---- | |
827 | struct type **dont_print; | |
828 | { | |
829 | int i, len, n_baseclasses; | |
2bfe2c53 | 830 | + char expr_tag[100]; /* Energize */ |
f823634c SG |
831 | |
832 | check_stub_type (type); | |
833 | ||
834 | *************** | |
835 | *** 549,554 **** | |
2bfe2c53 | 836 | --- 550,562 ---- |
f823634c SG |
837 | fprint_symbol (stream, TYPE_FIELD_NAME (type, i)); |
838 | fputs_filtered (" = ", stream); | |
839 | } | |
840 | + | |
841 | + sprintf(expr_tag, ".%s", TYPE_FIELD_NAME(type, i)); | |
842 | + | |
2bfe2c53 SG |
843 | + energize_start_variable_annotation(expr_tag, NULL, |
844 | + TYPE_FIELD_TYPE(type, i), | |
845 | + (CORE_ADDR) (valaddr + TYPE_FIELD_BITPOS(type, i) / 8), | |
846 | + ""); | |
f823634c SG |
847 | if (TYPE_FIELD_PACKED (type, i)) |
848 | { | |
849 | value v; | |
850 | *************** | |
851 | *** 567,572 **** | |
2bfe2c53 | 852 | --- 575,581 ---- |
f823634c SG |
853 | valaddr + TYPE_FIELD_BITPOS (type, i) / 8, |
854 | 0, stream, format, 0, recurse + 1, pretty); | |
855 | } | |
2bfe2c53 | 856 | + energize_end_variable_annotation(); |
f823634c SG |
857 | } |
858 | if (pretty) | |
859 | { | |
860 | *************** | |
861 | *** 801,806 **** | |
2bfe2c53 | 862 | --- 810,816 ---- |
f823634c SG |
863 | unsigned int rep1; |
864 | /* Number of repetitions we have detected so far. */ | |
865 | unsigned int reps; | |
2bfe2c53 | 866 | + char expr_tag[100]; /* Energize */ |
f823634c SG |
867 | |
868 | if (i != 0) | |
869 | if (arrayprint) | |
870 | *************** | |
871 | *** 822,827 **** | |
2bfe2c53 | 872 | --- 832,842 ---- |
f823634c SG |
873 | ++rep1; |
874 | } | |
875 | ||
876 | + sprintf(expr_tag, "[%d]", i); | |
2bfe2c53 SG |
877 | + energize_start_variable_annotation(expr_tag, NULL, |
878 | + elttype, | |
879 | + (CORE_ADDR) (valaddr + i * eltlen), | |
880 | + ""); | |
f823634c SG |
881 | if (reps > REPEAT_COUNT_THRESHOLD) |
882 | { | |
883 | val_print (elttype, valaddr + i * eltlen, | |
884 | *************** | |
885 | *** 838,843 **** | |
2bfe2c53 | 886 | --- 853,859 ---- |
f823634c SG |
887 | recurse + 1, pretty); |
888 | things_printed++; | |
889 | } | |
2bfe2c53 | 890 | + energize_end_variable_annotation(); |
f823634c SG |
891 | } |
892 | if (i < len) | |
893 | fprintf_filtered (stream, "..."); | |
2bfe2c53 SG |
894 | cvs diff: Diffing 29k-share |
895 | cvs diff: Diffing 29k-share/dfe | |
896 | cvs diff: Diffing 29k-share/include | |
897 | cvs diff: Diffing 29k-share/udi | |
898 | cvs diff: Diffing config | |
899 | =================================================================== | |
900 | RCS file: /local/cvsfiles/devo/gdb/config/amix.mh,v | |
901 | retrieving revision 1.4 | |
902 | diff -c -r1.4 amix.mh | |
903 | *** 1.4 1992/06/10 02:05:16 | |
904 | --- amix.mh 1992/07/05 17:47:19 | |
905 | *************** | |
906 | *** 22,24 **** | |
907 | --- 22,31 ---- | |
908 | ||
909 | # SVR4 puts the BSD compatible install in /usr/ucb. | |
910 | INSTALL = /usr/ucb/install -c | |
911 | + | |
912 | + # These are the libs that are needed for the Energize version of gdb on | |
913 | + # SVR4. Note that we MUST include the standard C library before libucb.a, | |
914 | + # otherwise we get lots of broken stuff we don't want. | |
915 | + ENERGIZE_LIB = energize/libconn.a | |
916 | + ENERGIZE_LIBS = ${ENERGIZE_LIB} -L/usr/lib -lm -lnet -lresolv -lform \ | |
917 | + -lsocket -lc /usr/ucblib/libucb.a -lnsl | |
918 | =================================================================== | |
919 | RCS file: /local/cvsfiles/devo/gdb/config/ncr3000.mh,v | |
920 | retrieving revision 1.4 | |
921 | diff -c -r1.4 ncr3000.mh | |
922 | *** 1.4 1992/06/15 19:25:13 | |
923 | --- ncr3000.mh 1992/07/05 17:49:34 | |
924 | *************** | |
925 | *** 38,40 **** | |
926 | --- 38,47 ---- | |
927 | # The /usr/ucb/install program is incompatible (complains about unknown | |
928 | # group staff). Use good old cp... | |
929 | INSTALL = cp | |
930 | + | |
931 | + # These are the libs that are needed for the Energize version of gdb on | |
932 | + # SVR4. Note that we MUST include the standard C library before libucb.a, | |
933 | + # otherwise we get lots of broken stuff we don't want. | |
934 | + ENERGIZE_LIB = energize/libconn.a | |
935 | + ENERGIZE_LIBS = ${ENERGIZE_LIB} -L/usr/lib -lm -lnet -lresolv -lform \ | |
936 | + -lsocket -lc /usr/ucblib/libucb.a -lnsl | |
937 | cvs diff: Diffing doc | |
938 | cvs diff: Diffing doc/config | |
939 | cvs diff: Diffing energize | |
940 | cvs diff: Diffing energize/config | |
941 | cvs diff: Diffing nindy-share | |
942 | cvs diff: Diffing tests | |
943 | cvs diff: Diffing vx-share |