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