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