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