* utils.c (strcmp_iw): Add a hack to allow "FOO(ARGS)" to
[deliverable/binutils-gdb.git] / gdb / energize-patches
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 ===================================================================
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
22 ***************
23 *** 123,128 ****
24 --- 123,135 ----
25 READLINE_DEP = $$(READLINE_DIR)
26 RL_LIB = ./../readline${subdir}/libreadline.a
27
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.
32 + ENERGIZE_DIR = energize
33 + ENERGIZE_LIB = ${ENERGIZE_DIR}/libconn.a
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 ***************
39 *** 155,166 ****
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
47 ADD_FILES = ${REGEX} ${ALLOCA} ${XM_ADD_FILES} ${TM_ADD_FILES}
48 ! ADD_DEPS = ${REGEX1} ${ALLOCA1} ${XM_ADD_FILES} ${TM_ADD_FILES}
49
50 VERSION = 4.6.3
51 DIST=gdb
52 --- 162,174 ----
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} \
56 ! ${ENERGIZE_LIB} ${XM_CLIBS} ${TM_CLIBS}
57 CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${BFD_LIB} ${MMALLOC_LIB} ${LIBIBERTY} \
58 ${RL_LIB} ${MMALLOC_LIB}
59
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
64 VERSION = 4.6.3
65 DIST=gdb
66 ***************
67 *** 203,209 ****
68 ${DEMANGLER}.c mem-break.c target.c inftarg.c \
69 dbxread.c coffread.c elfread.c dwarfread.c xcoffread.c stabsread.c \
70 ieee-float.c language.c parse.c buildsym.c objfiles.c \
71 ! minsyms.c mipsread.c maint.c
72
73 # Source files in subdirectories (which will be handled separately by
74 # 'make gdb.tar.Z').
75 --- 211,217 ----
76 ${DEMANGLER}.c mem-break.c target.c inftarg.c \
77 dbxread.c coffread.c elfread.c dwarfread.c xcoffread.c stabsread.c \
78 ieee-float.c language.c parse.c buildsym.c objfiles.c \
79 ! minsyms.c mipsread.c maint.c energize.c
80
81 # Source files in subdirectories (which will be handled separately by
82 # 'make gdb.tar.Z').
83 ***************
84 *** 289,295 ****
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) \
88 ! buildsym.o objfiles.o minsyms.o maint.o demangle.o \
89 dbxread.o coffread.o elfread.o dwarfread.o xcoffread.o mipsread.o \
90 stabsread.o
91
92 --- 297,303 ----
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) \
96 ! buildsym.o objfiles.o minsyms.o maint.o demangle.o energize.o \
97 dbxread.o coffread.o elfread.o dwarfread.o xcoffread.o mipsread.o \
98 stabsread.o
99
100 ***************
101 *** 303,309 ****
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
109 --- 311,317 ----
110
111 NTSSTART = kdb-start.o
112
113 ! SUBDIRS = doc ${ENERGIZE_DIR}
114
115 # For now, shortcut the "configure GDB for fewer languages" stuff.
116 YYFILES = c-exp.tab.c m2-exp.tab.c
117 ***************
118 *** 363,368 ****
119 --- 371,390 ----
120 #load `echo " "$(DEPFILES) | sed -e 's/\.o/.c/g' -e 's, , ../,g'`
121 echo "Load .c corresponding to:" $(DEPFILES)
122
123 + ${ENERGIZE_LIB} :
124 + @(cd ${ENERGIZE_DIR}; \
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 ***************
141 *** 652,658 ****
142 -e '/extern.*free/d' \
143 < y.tab.c > m2-exp.tab.c
144 -rm y.tab.c
145 -
146
147 main.o: ${srcdir}/main.c
148 ${CC} -c ${INTERNAL_CFLAGS} -I${READLINE_DIR} $<
149 --- 674,679 ----
150 *** breakpoint.c.orig Sun Aug 23 11:09:10 1992
151 --- breakpoint.c Mon Aug 24 19:22:26 1992
152 ***************
153 *** 273,278 ****
154 --- 273,279 ----
155 b->cond_string = NULL;
156 if (from_tty)
157 printf_filtered ("Breakpoint %d now unconditional.\n", bnum);
158 + energize_condition_breakpoint(b);
159 }
160 else
161 {
162 ***************
163 *** 281,286 ****
164 --- 282,288 ----
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);
168 + energize_condition_breakpoint(b);
169 if (*arg)
170 error ("Junk at end of expression");
171 }
172 ***************
173 *** 316,327 ****
174 ALL_BREAKPOINTS (b)
175 if (b->number == bnum)
176 {
177 ! if (from_tty && input_from_terminal_p ())
178 printf_filtered ("Type commands for when breakpoint %d is hit, one per line.\n\
179 End with a line saying just \"end\".\n", bnum);
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);
186 --- 318,330 ----
187 ALL_BREAKPOINTS (b)
188 if (b->number == bnum)
189 {
190 ! if ((from_tty && input_from_terminal_p ()) || energize)
191 printf_filtered ("Type commands for when breakpoint %d is hit, one per line.\n\
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;
196 + energize_commands_breakpoint(b);
197 return;
198 }
199 error ("No breakpoint number %d.", bnum);
200 ***************
201 *** 922,927 ****
202 --- 925,931 ----
203 {
204 b->ignore_count--;
205 this_bp_stop = 0;
206 + energize_ignore_breakpoint(b);
207 }
208 else
209 {
210 ***************
211 *** 1373,1378 ****
212 --- 1377,1384 ----
213 mention (b)
214 struct breakpoint *b;
215 {
216 + energize_create_breakpoint(b);
217 +
218 switch (b->type)
219 {
220 case bp_watchpoint:
221 ***************
222 *** 2120,2125 ****
223 --- 2126,2133 ----
224 register struct breakpoint *b;
225 register bpstat bs;
226
227 + energize_delete_breakpoint(bpt);
228 +
229 if (bpt->inserted)
230 target_remove_breakpoint(bpt->address, bpt->shadow_contents);
231
232 ***************
233 *** 2296,2301 ****
234 --- 2304,2310 ----
235 if (b->number == bptnum)
236 {
237 b->ignore_count = count;
238 + energize_ignore_breakpoint(b);
239 if (!from_tty)
240 return;
241 else if (count == 0)
242 ***************
243 *** 2320,2326 ****
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. */
251 --- 2329,2338 ----
252 struct breakpoint *b;
253
254 ALL_BREAKPOINTS (b)
255 ! {
256 ! b->ignore_count = 0;
257 ! energize_ignore_breakpoint(b);
258 ! }
259 }
260
261 /* Command to set ignore-count of breakpoint N to COUNT. */
262 ***************
263 *** 2387,2392 ****
264 --- 2399,2406 ----
265 {
266 bpt->enable = enabled;
267
268 + energize_enable_breakpoint(bpt);
269 +
270 if (xgdb_verbose && bpt->type == bp_breakpoint)
271 printf ("breakpoint #%d enabled\n", bpt->number);
272
273 ***************
274 *** 2434,2439 ****
275 --- 2448,2455 ----
276 disable_breakpoint (bpt)
277 struct breakpoint *bpt;
278 {
279 + energize_disable_breakpoint(bpt);
280 +
281 bpt->enable = disabled;
282
283 if (xgdb_verbose && bpt->type == bp_breakpoint)
284 *** command.c.orig Fri Jul 10 10:22:30 1992
285 --- command.c Mon Aug 24 19:22:26 1992
286 ***************
287 *** 1148,1154 ****
288 }
289
290 if (pid != -1)
291 ! while ((rc = wait (&status)) != pid && rc != -1)
292 ;
293 else
294 error ("Fork failed");
295 --- 1148,1154 ----
296 }
297
298 if (pid != -1)
299 ! while ((rc = energize_wait (&status)) != pid && rc != -1)
300 ;
301 else
302 error ("Fork failed");
303 *** configure.in.orig Tue Aug 18 11:35:50 1992
304 --- configure.in Mon Aug 24 19:22:26 1992
305 ***************
306 *** 1,4 ****
307 ! configdirs="doc"
308 srcname="GDB"
309 srctrigger=main.c
310 target_dependent=true
311 --- 1,4 ----
312 ! configdirs="energize doc"
313 srcname="GDB"
314 srctrigger=main.c
315 target_dependent=true
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 ----
321 #define MAINTENANCE_CMDS 1
322 #endif
323
324 + #include "energize.h"
325 +
326 #endif /* !defined (DEFS_H) */
327 *** inflow.c.orig Wed Jul 22 21:41:45 1992
328 --- inflow.c Mon Aug 24 19:22:27 1992
329 ***************
330 *** 89,95 ****
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 */
338 --- 89,95 ----
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 */
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 ----
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 */
354 + energize_new_process();
355
356 clear_proceed_status ();
357
358 ***************
359 *** 771,776 ****
360 --- 772,778 ----
361
362 attach (pid);
363 inferior_pid = pid;
364 + energize_new_process();
365 push_target (&child_ops);
366
367 mark_breakpoints_out ();
368 *** inftarg.c.orig Sun Mar 29 15:21:27 1992
369 --- inftarg.c Mon Aug 24 19:22:28 1992
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 {
379 --- 58,64 ----
380 #ifdef USE_PROC_FS
381 pid = proc_wait (status);
382 #else
383 ! pid = energize_wait (status);
384 #endif
385 if (pid == -1) /* No more children to wait for */
386 {
387 *** main.c.orig Fri Jul 10 10:22:33 1992
388 --- main.c Mon Aug 24 19:22:29 1992
389 ***************
390 *** 426,431 ****
391 --- 426,432 ----
392 char *corearg = NULL;
393 char *cdarg = NULL;
394 char *ttyarg = NULL;
395 + char *energize_id = NULL;
396
397 /* Pointers to all arguments of +command option. */
398 char **cmdarg;
399 ***************
400 *** 524,529 ****
401 --- 525,531 ----
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 ***************
410 *** 556,561 ****
411 --- 558,566 ----
412 case 11:
413 cdarg = optarg;
414 break;
415 + case 12:
416 + energize_id = optarg;
417 + break;
418 case 's':
419 symarg = optarg;
420 break;
421 ***************
422 *** 736,741 ****
423 --- 741,748 ----
424 free ((PTR)dirarg);
425 do_cleanups (ALL_CLEANUPS);
426
427 + energize_initialize (energize_id, execarg);
428 +
429 if (execarg != NULL
430 && symarg != NULL
431 && strcmp (execarg, symarg) == 0)
432 ***************
433 *** 850,856 ****
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 }
441 --- 857,866 ----
442 if (!setjmp (to_top_level))
443 {
444 do_cleanups (ALL_CLEANUPS); /* Do complete cleanup */
445 ! if (energize)
446 ! energize_main_loop();
447 ! else
448 ! command_loop ();
449 quit_command ((char *)0, instream == stdin);
450 }
451 }
452 ***************
453 *** 912,918 ****
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). */
461 --- 922,928 ----
462 else if (c->function.cfunc == NO_FUNCTION)
463 error ("That is not a command, just a help topic.");
464 else
465 ! energize_call_command (c, arg, from_tty & caution);
466 }
467
468 /* Tell the user if the language has changed (except first time). */
469 ***************
470 *** 1564,1570 ****
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;
478 --- 1574,1580 ----
479 while (1)
480 {
481 dont_repeat ();
482 ! p = energize_command_line_input ((char *) NULL, instream == stdin);
483 if (p == NULL)
484 /* Treat end of file like "end". */
485 break;
486 ***************
487 *** 1868,1874 ****
488 void
489 print_prompt ()
490 {
491 ! printf ("%s", prompt);
492 fflush (stdout);
493 }
494 \f
495 --- 1878,1884 ----
496 void
497 print_prompt ()
498 {
499 ! printf_filtered ("%s", prompt);
500 fflush (stdout);
501 }
502 \f
503 *** printcmd.c.orig Sun Jul 5 17:22:52 1992
504 --- printcmd.c Mon Aug 24 19:22:29 1992
505 ***************
506 *** 778,783 ****
507 --- 778,792 ----
508 {
509 int histindex = record_latest_value (val);
510
511 + if (energize)
512 + {
513 + char buf[20];
514 +
515 + sprintf(buf, "$%d", histindex);
516 + energize_start_variable_annotation(buf, NULL, VALUE_TYPE(val),
517 + VALUE_ADDRESS(val), "");
518 + }
519 +
520 if (inspect)
521 printf ("\031(gdb-makebuffer \"%s\" %d '(\"", exp, histindex);
522 else
523 ***************
524 *** 784,789 ****
525 --- 793,799 ----
526 if (histindex >= 0) printf_filtered ("$%d = ", histindex);
527
528 print_formatted (val, format, fmt.size);
529 + energize_end_variable_annotation();
530 printf_filtered ("\n");
531 if (inspect)
532 printf("\") )\030");
533 ***************
534 *** 1653,1663 ****
535 --- 1663,1681 ----
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 +
540 + energize_start_variable_annotation(SYMBOL_NAME(sym), sym,
541 + VALUE_TYPE(val),
542 + VALUE_ADDRESS(val), "");
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 +
550 + energize_end_variable_annotation();
551 +
552 first = 0;
553 }
554
555 *** stack.c.orig Fri Jul 3 20:21:45 1992
556 --- stack.c Mon Aug 24 19:22:30 1992
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
570 ! if (energize)
571 ! energize_annotate_function(fname, 0, level);
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));
590 ! if (energize)
591 ! energize_annotate_function(funname ? funname : "??", 0, level);
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));
610 ! if (!energize)
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 ");
628 ! if (energize)
629 ! energize_annotate_function(funname, DMGL_ANSI | DMGL_PARAMS,
630 ! selected_frame_level);
631 ! else
632 ! fputs_demangled (funname, stdout, DMGL_ANSI | DMGL_PARAMS);
633 }
634 wrap_here (" ");
635 if (sal.symtab)
636 *** symfile.c.orig Sun Aug 23 11:09:17 1992
637 --- symfile.c Mon Aug 24 19:22:30 1992
638 ***************
639 *** 611,616 ****
640 --- 611,618 ----
641 fflush (stdout);
642 }
643
644 + energize_symbol_file(objfile);
645 +
646 return (objfile);
647 }
648
649 *** utils.c.orig Sun Aug 23 11:09:21 1992
650 --- utils.c Mon Aug 24 19:22:31 1992
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)
660 --- 694,700 ----
661 register int ans2;
662
663 /* Automatically answer "yes" if input is not from a terminal. */
664 ! if (!input_from_terminal_p () && !energize)
665 return 1;
666
667 while (1)
668 ***************
669 *** 703,723 ****
670 fflush (stdout);
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')
691 --- 703,734 ----
692 fflush (stdout);
693 va_start (args);
694 ctlstr = va_arg (args, char *);
695 + energize_query (ctlstr, args);
696 vfprintf_filtered (stdout, ctlstr, args);
697 printf_filtered ("(y or n) ");
698 ! if (energize)
699 ! {
700 ! char *buf;
701 !
702 ! buf = energize_command_line_input(0, 0);
703 ! answer = buf ? *buf : 'Y';
704 ! energize_acknowledge_query(buf);
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 ***************
725 *** 725,730 ****
726 --- 736,742 ----
727 if (answer == 'N')
728 return 0;
729 printf_filtered ("Please answer y or n.\n");
730 + va_end (args);
731 }
732 }
733
734 ***************
735 *** 991,996 ****
736 --- 1003,1014 ----
737 if (linebuffer == 0)
738 return;
739
740 + if (energize)
741 + {
742 + energize_fputs(linebuffer);
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))
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 ----
754 struct type **dont_print;
755 {
756 int i, len, n_baseclasses;
757 + char expr_tag[100]; /* Energize */
758
759 check_stub_type (type);
760
761 ***************
762 *** 552,557 ****
763 --- 553,565 ----
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 +
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 + "");
774 if (TYPE_FIELD_PACKED (type, i))
775 {
776 value v;
777 ***************
778 *** 570,575 ****
779 --- 578,584 ----
780 valaddr + TYPE_FIELD_BITPOS (type, i) / 8,
781 0, stream, format, 0, recurse + 1, pretty);
782 }
783 + energize_end_variable_annotation();
784 }
785 if (pretty)
786 {
787 ***************
788 *** 804,809 ****
789 --- 813,819 ----
790 unsigned int rep1;
791 /* Number of repetitions we have detected so far. */
792 unsigned int reps;
793 + char expr_tag[100]; /* Energize */
794
795 if (i != 0)
796 if (arrayprint)
797 ***************
798 *** 825,830 ****
799 --- 835,845 ----
800 ++rep1;
801 }
802
803 + sprintf(expr_tag, "[%d]", i);
804 + energize_start_variable_annotation(expr_tag, NULL,
805 + elttype,
806 + (CORE_ADDR) (valaddr + i * eltlen),
807 + "");
808 if (reps > REPEAT_COUNT_THRESHOLD)
809 {
810 val_print (elttype, valaddr + i * eltlen,
811 ***************
812 *** 841,846 ****
813 --- 856,862 ----
814 recurse + 1, pretty);
815 things_printed++;
816 }
817 + energize_end_variable_annotation();
818 }
819 if (i < len)
820 fprintf_filtered (stream, "...");
821 *** demangle.c.orig Wed Jul 15 12:33:17 1992
822 --- demangle.c Mon Aug 24 19:22:32 1992
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
This page took 0.045094 seconds and 4 git commands to generate.