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",
5 ===================================================================
6 *** 2.72 1992/09/27 06:48:41
7 --- .Sanitize 1992/09/28 21:34:08
20 ===================================================================
21 *** 1.187 1992/09/26 08:06:30
22 --- Makefile.in 1992/09/28 21:34:08
26 READLINE_DEP = $$(READLINE_DIR)
27 RL_LIB = ./../readline${subdir}/libreadline.a
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.
33 + ENERGIZE_DIR = energize
34 + ENERGIZE_LIB = ${ENERGIZE_DIR}/libconn.a
36 # All the includes used for CFLAGS and for lint.
37 # -I. for config files.
38 # -I${srcdir} possibly for regex.h also.
41 # Libraries and corresponding dependencies for compiling gdb.
42 # {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs.
43 # TERMCAP comes after readline, since readline depends on it.
44 ! CLIBS = ${BFD_LIB} ${RL_LIB} ${TERMCAP} ${OPCODES} ${MMALLOC_LIB} ${LIBIBERTY} \
45 ! ${XM_CLIBS} ${TM_CLIBS} ${NAT_CLIBS}
46 ! CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${NAT_CDEPS} \
47 ! ${BFD_LIB} ${RL_LIB} ${OPCODES} ${MMALLOC_LIB} ${LIBIBERTY}
49 ADD_FILES = ${REGEX} ${ALLOCA} ${XM_ADD_FILES} ${TM_ADD_FILES} ${NAT_ADD_FILES}
50 ADD_DEPS = ${REGEX1} ${ALLOCA1} ${XM_ADD_FILES} ${TM_ADD_FILES} ${NAT_ADD_FILES}
52 # Libraries and corresponding dependencies for compiling gdb.
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} ${OPCODES} ${MMALLOC_LIB} \
56 ! ${LIBIBERTY} ${XM_CLIBS} ${TM_CLIBS} ${NAT_CLIBS} ${ENERGIZE_LIB}
57 ! CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${NAT_CDEPS} ${BFD_LIB} ${RL_LIB} ${OPCODES} \
58 ! ${MMALLOC_LIB} ${LIBIBERTY} ${ENERGIZE_LIB}
60 ADD_FILES = ${REGEX} ${ALLOCA} ${XM_ADD_FILES} ${TM_ADD_FILES} ${NAT_ADD_FILES}
61 ADD_DEPS = ${REGEX1} ${ALLOCA1} ${XM_ADD_FILES} ${TM_ADD_FILES} ${NAT_ADD_FILES}
64 mem-break.c target.c \
65 dbxread.c coffread.c elfread.c dwarfread.c xcoffread.c stabsread.c \
66 language.c parse.c buildsym.c objfiles.c \
67 ! minsyms.c mipsread.c maint.c
69 # Source files in subdirectories (which will be handled separately by
72 mem-break.c target.c \
73 dbxread.c coffread.c elfread.c dwarfread.c xcoffread.c stabsread.c \
74 language.c parse.c buildsym.c objfiles.c \
75 ! minsyms.c mipsread.c maint.c energize.c
77 # Source files in subdirectories (which will be handled separately by
81 command.o utils.o expprint.o environ.o version.o gdbtypes.o \
82 copying.o $(DEPFILES) mem-break.o target.o \
83 putenv.o parse.o language.o $(YYOBJ) \
84 ! buildsym.o objfiles.o minsyms.o maint.o demangle.o \
85 dbxread.o coffread.o elfread.o dwarfread.o xcoffread.o mipsread.o \
89 command.o utils.o expprint.o environ.o version.o gdbtypes.o \
90 copying.o $(DEPFILES) mem-break.o target.o \
91 putenv.o parse.o language.o $(YYOBJ) \
92 ! buildsym.o objfiles.o minsyms.o maint.o demangle.o energize.o \
93 dbxread.o coffread.o elfread.o dwarfread.o xcoffread.o mipsread.o \
99 NTSSTART = kdb-start.o
103 # For now, shortcut the "configure GDB for fewer languages" stuff.
104 YYFILES = c-exp.tab.c m2-exp.tab.c
107 NTSSTART = kdb-start.o
109 ! SUBDIRS = doc ${ENERGIZE_DIR}
111 # For now, shortcut the "configure GDB for fewer languages" stuff.
112 YYFILES = c-exp.tab.c m2-exp.tab.c
116 #load `echo " "$(DEPFILES) | sed -e 's/\.o/.c/g' -e 's, , ../,g'`
117 echo "Load .c corresponding to:" $(DEPFILES)
120 + @(cd ${ENERGIZE_DIR}; \
122 + "against=$(against)" \
124 + "AR_FLAGS=$(AR_FLAGS)" \
126 + "CFLAGS=$(CFLAGS)" \
127 + "RANLIB=$(RANLIB)" \
128 + "MAKEINFO=$(MAKEINFO)" \
129 + "INSTALL=$(INSTALL)" \
130 + "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
131 + "INSTALL_DATA=$(INSTALL_DATA)" \
134 # This is useful when debugging GDB, because some Unix's don't let you run GDB
135 # on itself without copying the executable. So "make gdb1" will make
136 ===================================================================
137 *** 1.48 1992/09/29 05:07:04
138 --- breakpoint.c 1992/09/28 21:34:09
142 b->cond_string = NULL;
144 printf_filtered ("Breakpoint %d now unconditional.\n", bnum);
145 + energize_condition_breakpoint(b);
152 typed in or the decompiled expression. */
153 b->cond_string = savestring (arg, strlen (arg));
154 b->cond = parse_exp_1 (&arg, block_for_pc (b->address), 0);
155 + energize_condition_breakpoint(b);
157 error ("Junk at end of expression");
162 l = read_command_lines ();
163 free_command_lines (&b->commands);
165 + energize_commands_breakpoint(b);
168 error ("No breakpoint number %d.", bnum);
171 b->enable = disabled;
172 if (!disabled_breaks)
175 ! "Cannot insert breakpoint %d:\n", b->number);
176 printf_filtered ("Disabling shared library breakpoints:\n");
180 b->enable = disabled;
181 if (!disabled_breaks)
183 ! fprintf_filtered (stderr, "Cannot insert breakpoint %d:\n",
185 printf_filtered ("Disabling shared library breakpoints:\n");
193 ! fprintf (stderr, "Cannot insert breakpoint %d:\n", b->number);
194 #ifdef ONE_PROCESS_WRITETEXT
196 ! "The same program may be running in another process.\n");
198 memory_error (val, b->address); /* which bombs us out */
204 ! fprintf_filtered (stderr, "Cannot insert breakpoint %d:\n",
206 #ifdef ONE_PROCESS_WRITETEXT
207 ! fprintf_filtered (stderr,
208 ! "The same program may be running in another process.\n");
210 memory_error (val, b->address); /* which bombs us out */
216 #ifdef BREAKPOINT_DEBUG
217 ! printf ("Removing breakpoints.\n");
218 #endif /* BREAKPOINT_DEBUG */
224 #ifdef BREAKPOINT_DEBUG
225 ! printf_filtered ("Removing breakpoints.\n");
226 #endif /* BREAKPOINT_DEBUG */
233 #ifdef BREAKPOINT_DEBUG
234 ! printf ("Removed breakpoint at %s",
235 ! local_hex_string(b->address));
236 ! printf (", shadow %s",
237 ! local_hex_string(b->shadow_contents[0]));
239 ! local_hex_string(b->shadow_contents[1]));
240 #endif /* BREAKPOINT_DEBUG */
246 #ifdef BREAKPOINT_DEBUG
247 ! printf_filtered ("Removed breakpoint at %s",
248 ! local_hex_string(b->address));
249 ! printf_filtered (", shadow %s",
250 ! local_hex_string(b->shadow_contents[0]));
251 ! printf_filtered (", %s.\n",
252 ! local_hex_string(b->shadow_contents[1]));
253 #endif /* BREAKPOINT_DEBUG */
262 + energize_ignore_breakpoint(b);
271 ! printf ("Note: breakpoint%s ", (others > 1) ? "s" : "");
273 if (b->address == pc)
278 ! (b->enable == disabled) ? " (disabled)" : "",
279 ! (others > 1) ? "," : ((others == 1) ? " and" : ""));
281 ! printf ("also set at pc %s.\n", local_hex_string(pc));
289 ! printf_filtered ("Note: breakpoint%s ", (others > 1) ? "s" : "");
291 if (b->address == pc)
294 ! printf_filtered ("%d%s%s ",
296 ! (b->enable == disabled) ? " (disabled)" : "",
297 ! (others > 1) ? "," :
298 ! ((others == 1) ? " and" : ""));
300 ! printf_filtered ("also set at pc %s.\n", local_hex_string(pc));
308 struct breakpoint *b;
310 + energize_create_breakpoint(b);
320 ! printf ("Multiple breakpoints were set.\n");
321 ! printf ("Use the \"delete\" command to delete unwanted breakpoints.\n");
323 free ((PTR)sals.sals);
329 ! printf_filtered ("Multiple breakpoints were set.\n");
330 ! printf_filtered ("Use the \"delete\" command to delete unwanted breakpoints.\n");
332 free ((PTR)sals.sals);
339 ! printf ("No catch clause for exception %s.\n", p);
347 ! printf_filtered ("No catch clause for exception %s.\n", p);
354 b->disposition = tempflag ? delete : donttouch;
356 ! printf ("Breakpoint %d at %s", b->number, local_hex_string(b->address));
358 ! printf (": file %s, line %d.", b->symtab->filename, b->line_number);
364 ! printf ("Multiple breakpoints were set.\n");
365 ! printf ("Use the \"delete\" command to delete unwanted breakpoints.\n");
367 free ((PTR)sals.sals);
371 b->disposition = tempflag ? delete : donttouch;
373 ! printf_filtered ("Breakpoint %d at %s", b->number,
374 ! local_hex_string(b->address));
376 ! printf_filtered (": file %s, line %d.",
377 ! b->symtab->filename, b->line_number);
378 ! printf_filtered ("\n");
383 ! printf_filtered ("Multiple breakpoints were set.\n");
384 ! printf_filtered ("Use the \"delete\" command to delete unwanted breakpoints.\n");
386 free ((PTR)sals.sals);
392 if (found->next) from_tty = 1; /* Always report if deleted more than one */
393 ! if (from_tty) printf ("Deleted breakpoint%s ", found->next ? "s" : "");
396 ! if (from_tty) printf ("%d ", found->number);
398 delete_breakpoint (found);
403 if (found->next) from_tty = 1; /* Always report if deleted more than one */
404 ! if (from_tty) printf_filtered ("Deleted breakpoint%s ",
405 ! found->next ? "s" : "");
408 ! if (from_tty) printf_filtered ("%d ", found->number);
410 delete_breakpoint (found);
415 register struct breakpoint *b;
418 + energize_delete_breakpoint(bpt);
421 target_remove_breakpoint(bpt->address, bpt->shadow_contents);
425 free ((PTR)bpt->addr_string);
427 if (xgdb_verbose && bpt->type == bp_breakpoint)
428 ! printf ("breakpoint #%d deleted\n", bpt->number);
430 /* Be sure no bpstat's are pointing at it after it's been freed. */
431 /* FIXME, how can we find all bpstat's? We just check stop_bpstat for now. */
433 free ((PTR)bpt->addr_string);
435 if (xgdb_verbose && bpt->type == bp_breakpoint)
436 ! printf_filtered ("breakpoint #%d deleted\n", bpt->number);
438 /* Be sure no bpstat's are pointing at it after it's been freed. */
439 /* FIXME, how can we find all bpstat's? We just check stop_bpstat for now. */
443 ALL_BREAKPOINTS_SAFE (b, temp)
445 ! sprintf (message, message1, b->number); /* Format possible error msg */
446 catch_errors (breakpoint_re_set_one, (char *) b, message);
451 ALL_BREAKPOINTS_SAFE (b, temp)
453 ! printf_filtered (message, message1, b->number); /* Format possible error msg */
454 catch_errors (breakpoint_re_set_one, (char *) b, message);
460 if (b->number == bptnum)
462 b->ignore_count = count;
463 + energize_ignore_breakpoint(b);
469 struct breakpoint *b;
472 ! b->ignore_count = 0;
475 /* Command to set ignore-count of breakpoint N to COUNT. */
477 struct breakpoint *b;
481 ! b->ignore_count = 0;
482 ! energize_ignore_breakpoint(b);
486 /* Command to set ignore-count of breakpoint N to COUNT. */
492 ! printf ("No breakpoint number %d.\n", num);
500 ! printf_filtered ("No breakpoint number %d.\n", num);
507 bpt->enable = enabled;
509 if (xgdb_verbose && bpt->type == bp_breakpoint)
510 ! printf ("breakpoint #%d enabled\n", bpt->number);
512 check_duplicates (bpt->address);
513 if (bpt->type == bp_watchpoint)
516 bpt->enable = enabled;
518 + energize_enable_breakpoint(bpt);
520 if (xgdb_verbose && bpt->type == bp_breakpoint)
521 ! printf_filtered ("breakpoint #%d enabled\n", bpt->number);
523 check_duplicates (bpt->address);
524 if (bpt->type == bp_watchpoint)
528 disable_breakpoint (bpt)
529 struct breakpoint *bpt;
531 + energize_disable_breakpoint(bpt);
533 bpt->enable = disabled;
535 if (xgdb_verbose && bpt->type == bp_breakpoint)
536 ===================================================================
537 *** 1.18 1992/07/10 17:22:30
538 --- command.c 1992/09/28 21:34:09
543 error ("gdb internal error: bad cmd_type in do_setshow_command");
544 (*c->function.sfunc) (NULL, from_tty, c);
549 /* Show all the settings in a list of show commands. */
555 ! while ((rc = wait (&status)) != pid && rc != -1)
558 error ("Fork failed");
563 ! while ((rc = energize_shell_wait (&status)) != pid && rc != -1)
566 error ("Fork failed");
567 ===================================================================
568 *** 1.67 1992/09/21 20:01:00
569 --- configure.in 1992/09/28 21:34:10
577 ! configdirs="energize doc"
581 ===================================================================
582 *** 1.48 1992/09/15 08:55:59
583 --- defs.h 1992/09/28 21:34:10
587 #define MAINTENANCE_CMDS 1
590 + #include "energize.h"
592 #endif /* !defined (DEFS_H) */
593 ===================================================================
594 *** 2.5 1992/09/03 16:26:03
595 --- demangle.c 1992/09/28 21:34:10
598 the appropriate target configuration file. */
600 #ifndef DEFAULT_DEMANGLING_STYLE
601 ! # define DEFAULT_DEMANGLING_STYLE AUTO_DEMANGLING_STYLE_STRING
604 /* String name for the current demangling style. Set by the "set demangling"
606 the appropriate target configuration file. */
608 #ifndef DEFAULT_DEMANGLING_STYLE
609 ! # define DEFAULT_DEMANGLING_STYLE LUCID_DEMANGLING_STYLE_STRING
612 /* String name for the current demangling style. Set by the "set demangling"
613 ===================================================================
614 *** 1.34 1992/09/26 05:20:04
615 --- infcmd.c 1992/09/28 21:34:11
620 target_create_inferior (exec_file, inferior_args,
621 environ_vector (inferior_environ));
622 + energize_new_process();
626 ===================================================================
627 *** 1.29 1992/09/25 19:19:00
628 --- inflow.c 1992/09/28 21:34:11
631 static short pgrp_inferior;
632 static short pgrp_ours;
633 # else /* not def SHORT_PGRP */
634 ! static int pgrp_inferior;
635 static int pgrp_ours;
636 # endif /* not def SHORT_PGRP */
637 #else /* not def TIOCGPGRP */
639 static short pgrp_inferior;
640 static short pgrp_ours;
641 # else /* not def SHORT_PGRP */
643 static int pgrp_ours;
644 # endif /* not def SHORT_PGRP */
645 #else /* not def TIOCGPGRP */
646 ===================================================================
647 *** 1.59 1992/09/26 01:49:01
648 --- infrun.c 1992/09/28 21:34:12
651 flush_cached_frames ();
652 registers_changed ();
656 #ifdef SIGTRAP_STOP_AFTER_LOAD
659 flush_cached_frames ();
660 registers_changed ();
662 ! energize_wait (&w);
664 #ifdef SIGTRAP_STOP_AFTER_LOAD
666 ===================================================================
667 *** 1.17 1992/09/26 09:06:10
668 --- inftarg.c 1992/09/28 21:34:12
675 + energize_new_process();
676 push_target (&child_ops);
677 #endif /* ATTACH_DETACH */
679 ===================================================================
680 *** 1.57 1992/09/29 05:07:14
681 --- main.c 1992/09/28 21:34:13
685 char *corearg = NULL;
688 + char *energize_id = NULL;
690 /* Pointers to all arguments of +command option. */
695 {"tty", required_argument, 0, 't'},
696 {"baud", required_argument, 0, 'b'},
697 {"b", required_argument, 0, 'b'},
698 + {"context", required_argument, 0, 12},
699 /* Allow machine descriptions to add more options... */
700 #ifdef ADDITIONAL_OPTIONS
709 + energize_id = optarg;
716 ADDITIONAL_OPTION_CASES
720 "Use `%s +help' for a complete list of options.\n",
724 ADDITIONAL_OPTION_CASES
727 ! fprintf_filtered (stderr,
728 "Use `%s +help' for a complete list of options.\n",
733 corearg = argv[optind];
737 "Excess command line arguments ignored. (%s%s)\n",
738 argv[optind], (optind == argc - 1) ? "" : " ...");
741 corearg = argv[optind];
744 ! fprintf_filtered (stderr,
745 "Excess command line arguments ignored. (%s%s)\n",
746 argv[optind], (optind == argc - 1) ? "" : " ...");
752 /* Run the init function of each source file */
754 + /* Must call this first to setup tty */
755 + energize_initialize (energize_id, execarg);
757 initialize_cmd_lists (); /* This needs to be done first */
758 initialize_all_files ();
759 initialize_main (); /* But that omits this file! Do it now */
762 if (!setjmp (to_top_level))
764 do_cleanups (ALL_CLEANUPS); /* Do complete cleanup */
766 quit_command ((char *)0, instream == stdin);
770 if (!setjmp (to_top_level))
772 do_cleanups (ALL_CLEANUPS); /* Do complete cleanup */
774 ! energize_main_loop();
777 quit_command ((char *)0, instream == stdin);
782 else if (c->function.cfunc == NO_FUNCTION)
783 error ("That is not a command, just a help topic.");
785 ! (*c->function.cfunc) (arg, from_tty & caution);
788 /* Tell the user if the language has changed (except first time). */
790 else if (c->function.cfunc == NO_FUNCTION)
791 error ("That is not a command, just a help topic.");
793 ! energize_call_command (c, arg, from_tty & caution);
796 /* Tell the user if the language has changed (except first time). */
800 signal (STOP_SIGNAL, stop_sig);
802 ! printf ("%s", prompt);
805 /* Forget about any previous command -- null line now will do nothing. */
808 signal (STOP_SIGNAL, stop_sig);
810 ! printf_filtered ("%s", prompt);
813 /* Forget about any previous command -- null line now will do nothing. */
818 /* Print the changes. */
819 ! printf ("%s\n", history_value);
821 /* If there was an error, call this function again. */
826 /* Print the changes. */
827 ! printf_filtered ("%s\n", history_value);
829 /* If there was an error, call this function again. */
836 ! p = command_line_input ((char *) NULL, instream == stdin);
838 /* Treat end of file like "end". */
844 ! p = energize_command_line_input ((char *) NULL, instream == stdin);
846 /* Treat end of file like "end". */
853 ! printf ("\"info\" must be followed by the name of an info command.\n");
854 help_list (infolist, "info ", -1, stdout);
861 ! printf_filtered ("\"info\" must be followed by the name of an info command.\n");
862 help_list (infolist, "info ", -1, stdout);
870 ! printf ("Type commands for definition of \"%s\".\n\
871 End with a line saying just \"end\".\n", comname);
878 ! printf_filtered ("Type commands for definition of \"%s\".\n\
879 End with a line saying just \"end\".\n", comname);
884 error ("Command \"%s\" is built-in.", comname);
887 ! printf ("Type documentation for \"%s\".\n\
888 End with a line saying just \"end\".\n", comname);
890 doclines = read_command_lines ();
892 error ("Command \"%s\" is built-in.", comname);
895 ! printf_filtered ("Type documentation for \"%s\".\n\
896 End with a line saying just \"end\".\n", comname);
898 doclines = read_command_lines ();
902 print_gnu_advertisement()
905 GDB is free software and you are welcome to distribute copies of it\n\
906 under certain conditions; type \"show copying\" to see the conditions.\n\
907 There is absolutely no warranty for GDB; type \"show warranty\" for details.\n\
910 print_gnu_advertisement()
912 ! printf_filtered ("\
913 GDB is free software and you are welcome to distribute copies of it\n\
914 under certain conditions; type \"show copying\" to see the conditions.\n\
915 There is absolutely no warranty for GDB; type \"show warranty\" for details.\n\
921 ! printf ("%s", prompt);
929 ! printf_filtered ("%s", prompt);
935 getcwd (dirbuf, sizeof (dirbuf));
937 if (strcmp (dirbuf, current_directory))
938 ! printf ("Working directory %s\n (canonically %s).\n",
939 current_directory, dirbuf);
941 ! printf ("Working directory %s.\n", current_directory);
946 getcwd (dirbuf, sizeof (dirbuf));
948 if (strcmp (dirbuf, current_directory))
949 ! printf_filtered ("Working directory %s\n (canonically %s).\n",
950 current_directory, dirbuf);
952 ! printf_filtered ("Working directory %s.\n", current_directory);
961 ! printf ("\"set history\" must be followed by the name of a history subcommand.\n");
962 help_list (sethistlist, "set history ", -1, stdout);
969 ! printf_filtered ("\"set history\" must be followed by the name of a history subcommand.\n");
970 help_list (sethistlist, "set history ", -1, stdout);
973 ===================================================================
974 *** 1.33 1992/09/29 05:07:19
975 --- printcmd.c 1992/09/28 21:34:13
979 int histindex = record_latest_value (val);
982 ! printf ("\031(gdb-makebuffer \"%s\" %d '(\"", exp, histindex);
984 if (histindex >= 0) printf_filtered ("$%d = ", histindex);
986 print_formatted (val, format, fmt.size);
987 printf_filtered ("\n");
989 ! printf("\") )\030");
995 int histindex = record_latest_value (val);
1001 + sprintf(buf, "$%d", histindex);
1002 + energize_start_variable_annotation(buf, NULL, VALUE_TYPE(val),
1003 + VALUE_ADDRESS(val), "");
1007 ! printf_filtered ("\031(gdb-makebuffer \"%s\" %d '(\"", exp, histindex);
1009 if (histindex >= 0) printf_filtered ("$%d = ", histindex);
1011 print_formatted (val, format, fmt.size);
1012 + energize_end_variable_annotation();
1013 printf_filtered ("\n");
1015 ! printf_filtered("\") )\030");
1022 if (is_a_field_of_this)
1024 ! printf ("Symbol \"%s\" is a field of the local class variable `this'\n", exp);
1030 if (is_a_field_of_this)
1032 ! printf_filtered ("Symbol \"%s\" is a field of the local class variable `this'\n", exp);
1038 msymbol = lookup_minimal_symbol (exp, (struct objfile *) NULL);
1040 if (msymbol != NULL)
1041 ! printf ("Symbol \"%s\" is at %s in a file compiled without debugging.\n",
1042 exp, local_hex_string(msymbol -> address));
1044 error ("No symbol \"%s\" in current context.", exp);
1046 msymbol = lookup_minimal_symbol (exp, (struct objfile *) NULL);
1048 if (msymbol != NULL)
1049 ! printf_filtered ("Symbol \"%s\" is at %s in a file compiled without debugging.\n",
1050 exp, local_hex_string(msymbol -> address));
1052 error ("No symbol \"%s\" in current context.", exp);
1058 ! printf ("Symbol \"%s\" is ", SYMBOL_NAME (sym));
1059 val = SYMBOL_VALUE (sym);
1060 basereg = SYMBOL_BASEREG (sym);
1066 ! printf_filtered ("Symbol \"%s\" is ", SYMBOL_NAME (sym));
1067 val = SYMBOL_VALUE (sym);
1068 basereg = SYMBOL_BASEREG (sym);
1074 case LOC_CONST_BYTES:
1075 ! printf ("constant");
1079 ! printf ("a label at address %s", local_hex_string(SYMBOL_VALUE_ADDRESS (sym)));
1083 ! printf ("a variable in register %s", reg_names[val]);
1087 ! printf ("static storage at address %s", local_hex_string(SYMBOL_VALUE_ADDRESS (sym)));
1091 ! printf ("an argument in register %s", reg_names[val]);
1095 if (SYMBOL_BASEREG_VALID (sym))
1097 ! printf ("an argument at offset %ld from register %s",
1098 val, reg_names[basereg]);
1102 ! printf ("an argument at offset %ld", val);
1109 case LOC_CONST_BYTES:
1110 ! printf_filtered ("constant");
1114 ! printf_filtered ("a label at address %s", local_hex_string(SYMBOL_VALUE_ADDRESS (sym)));
1118 ! printf_filtered ("a variable in register %s", reg_names[val]);
1122 ! printf_filtered ("static storage at address %s", local_hex_string(SYMBOL_VALUE_ADDRESS (sym)));
1126 ! printf_filtered ("an argument in register %s", reg_names[val]);
1130 if (SYMBOL_BASEREG_VALID (sym))
1132 ! printf_filtered ("an argument at offset %ld from register %s",
1133 val, reg_names[basereg]);
1137 ! printf_filtered ("an argument at offset %ld", val);
1144 if (SYMBOL_BASEREG_VALID (sym))
1146 ! printf ("an argument at offset %ld from register %s",
1147 val, reg_names[basereg]);
1151 ! printf ("an argument at frame offset %ld", val);
1157 if (SYMBOL_BASEREG_VALID (sym))
1159 ! printf_filtered ("an argument at offset %ld from register %s",
1160 val, reg_names[basereg]);
1164 ! printf_filtered ("an argument at frame offset %ld", val);
1171 if (SYMBOL_BASEREG_VALID (sym))
1173 ! printf ("a local variable at offset %ld from register %s",
1174 val, reg_names[basereg]);
1178 ! printf ("a local variable at frame offset %ld", val);
1183 ! printf ("a reference argument at offset %ld", val);
1187 ! printf ("a typedef");
1191 ! printf ("a function at address %s",
1192 local_hex_string(BLOCK_START (SYMBOL_BLOCK_VALUE (sym))));
1196 ! printf ("of unknown (botched) type");
1205 if (SYMBOL_BASEREG_VALID (sym))
1207 ! printf_filtered ("a local variable at offset %ld from register %s",
1208 val, reg_names[basereg]);
1212 ! printf_filtered ("a local variable at frame offset %ld", val);
1217 ! printf_filtered ("a reference argument at offset %ld", val);
1221 ! printf_filtered ("a typedef");
1225 ! printf_filtered ("a function at address %s",
1226 local_hex_string(BLOCK_START (SYMBOL_BLOCK_VALUE (sym))));
1230 ! printf_filtered ("of unknown (botched) type");
1233 ! printf_filtered (".\n");
1239 d->status = disabled;
1242 ! printf ("No display number %d.\n", num);
1247 d->status = disabled;
1250 ! printf_filtered ("No display number %d.\n", num);
1256 if (current_display_number >= 0)
1258 disable_display (current_display_number);
1259 ! fprintf (stderr, "Disabling display %d to avoid infinite recursion.\n",
1260 current_display_number);
1262 current_display_number = -1;
1264 if (current_display_number >= 0)
1266 disable_display (current_display_number);
1267 ! fprintf_filtered (stderr, "Disabling display %d to avoid infinite recursion.\n",
1268 current_display_number);
1270 current_display_number = -1;
1273 register struct display *d;
1276 ! printf ("There are no auto-display expressions now.\n");
1278 printf_filtered ("Auto-display expressions now in effect:\n\
1279 Num Enb Expression\n");
1281 register struct display *d;
1284 ! printf_filtered ("There are no auto-display expressions now.\n");
1286 printf_filtered ("Auto-display expressions now in effect:\n\
1287 Num Enb Expression\n");
1290 d->status = enabled;
1293 ! printf ("No display number %d.\n", num);
1296 while (*p == ' ' || *p == '\t')
1298 d->status = enabled;
1301 ! printf_filtered ("No display number %d.\n", num);
1304 while (*p == ' ' || *p == '\t')
1308 standard indentation here is 4 spaces, and val_print indents
1309 2 for each recurse. */
1310 val = read_var_value (sym, FRAME_INFO_ID (fi));
1312 + energize_start_variable_annotation(SYMBOL_NAME(sym), sym,
1314 + VALUE_ADDRESS(val), "");
1317 val_print (VALUE_TYPE (val), VALUE_CONTENTS (val), VALUE_ADDRESS (val),
1318 stream, 0, 0, 2, Val_no_prettyprint);
1320 fputs_filtered ("???", stream);
1322 + energize_end_variable_annotation();
1327 ===================================================================
1328 *** 1.35 1992/09/18 09:20:00
1329 --- stack.c 1992/09/28 21:34:14
1333 printf_filtered ("%s in ", local_hex_string(fi->pc));
1335 ! fputs_demangled (fname, stdout, 0);
1336 fputs_filtered (" (...)\n", stdout);
1341 printf_filtered ("%s in ", local_hex_string(fi->pc));
1344 ! energize_annotate_function(fname, 0, level);
1346 ! fputs_demangled (fname, stdout, 0);
1347 fputs_filtered (" (...)\n", stdout);
1353 if (fi->pc != sal.pc || !sal.symtab)
1354 printf_filtered ("%s in ", local_hex_string(fi->pc));
1355 ! fputs_demangled (funname ? funname : "??", stdout, 0);
1357 fputs_filtered (" (", stdout);
1361 if (fi->pc != sal.pc || !sal.symtab)
1362 printf_filtered ("%s in ", local_hex_string(fi->pc));
1364 ! energize_annotate_function(funname ? funname : "??", 0, level);
1366 ! fputs_demangled (funname ? funname : "??", stdout, 0);
1368 fputs_filtered (" (", stdout);
1373 if (addressprint && mid_statement)
1374 printf_filtered ("%s\t", local_hex_string(fi->pc));
1375 ! print_source_lines (sal.symtab, sal.line, sal.line + 1, 0);
1377 current_source_line = max (sal.line - lines_to_list/2, 1);
1381 if (addressprint && mid_statement)
1382 printf_filtered ("%s\t", local_hex_string(fi->pc));
1384 ! print_source_lines (sal.symtab, sal.line, sal.line + 1, 0);
1386 current_source_line = max (sal.line - lines_to_list/2, 1);
1392 printf_filtered (" in ");
1393 ! fputs_demangled (funname, stdout, DMGL_ANSI | DMGL_PARAMS);
1400 printf_filtered (" in ");
1402 ! energize_annotate_function(funname, DMGL_ANSI | DMGL_PARAMS,
1403 ! selected_frame_level);
1405 ! fputs_demangled (funname, stdout, DMGL_ANSI | DMGL_PARAMS);
1409 ===================================================================
1410 *** 1.59 1992/09/29 05:07:26
1411 --- symfile.c 1992/09/28 21:34:14
1418 + energize_symbol_file(objfile);
1425 current_source_line = 0;
1428 ! printf ("No symbol file now.\n");
1433 current_source_line = 0;
1436 ! printf_filtered ("No symbol file now.\n");
1443 clear_symtab_users_done = clear_symtab_users_queued;
1445 ! printf ("Resetting debugger state after updating old symbol tables\n");
1447 /* Someday, we should do better than this, by only blowing away
1448 the things that really need to be blown. */
1451 clear_symtab_users_done = clear_symtab_users_queued;
1453 ! printf_filtered ("Resetting debugger state after updating old symbol tables\n");
1455 /* Someday, we should do better than this, by only blowing away
1456 the things that really need to be blown. */
1457 ===================================================================
1458 *** 1.63 1992/09/26 05:34:06
1459 --- utils.c 1992/09/28 21:34:15
1464 ctlstr = va_arg (args, char *);
1465 vfprintf_filtered (stdout, ctlstr, args);
1467 printf_filtered ("(y or n) ");
1469 ! answer = fgetc (stdin);
1470 ! clearerr (stdin); /* in case of C-d */
1471 ! if (answer == EOF) /* C-d */
1473 ! if (answer != '\n') /* Eat rest of input line, to EOF or newline */
1476 ! ans2 = fgetc (stdin);
1479 ! while (ans2 != EOF && ans2 != '\n');
1486 ctlstr = va_arg (args, char *);
1487 + energize_query (ctlstr, args);
1488 vfprintf_filtered (stdout, ctlstr, args);
1489 printf_filtered ("(y or n) ");
1494 ! buf = energize_command_line_input(0, 0);
1495 ! answer = buf ? *buf : 'Y';
1496 ! energize_acknowledge_query(buf);
1501 ! answer = fgetc (stdin);
1502 ! clearerr (stdin); /* in case of C-d */
1503 ! if (answer == EOF) /* C-d */
1505 ! if (answer != '\n') /* Eat rest of input line, to EOF or newline */
1508 ! ans2 = fgetc (stdin);
1511 ! while (ans2 != EOF && ans2 != '\n');
1521 printf_filtered ("Please answer y or n.\n");
1529 if (linebuffer == 0)
1534 + energize_fputs(linebuffer);
1538 /* Don't do any filtering if it is disabled. */
1539 if (stream != stdout
1540 || (lines_per_page == UINT_MAX && chars_per_line == UINT_MAX))
1541 ===================================================================
1542 *** 1.55 1992/09/29 05:07:34
1543 --- valprint.c 1992/09/28 21:34:15
1546 VALUE_CONTENTS (val) + typelen * i,
1547 VALUE_ADDRESS (val) + typelen * i,
1548 stream, format, 1, 0, pretty);
1549 ! fprintf (stream, " <repeats %u times>", reps);
1551 things_printed += REPEAT_COUNT_THRESHOLD;
1554 VALUE_CONTENTS (val) + typelen * i,
1555 VALUE_ADDRESS (val) + typelen * i,
1556 stream, format, 1, 0, pretty);
1557 ! fprintf_filtered (stream, " <repeats %u times>", reps);
1559 things_printed += REPEAT_COUNT_THRESHOLD;
1564 struct type **dont_print;
1566 int i, len, n_baseclasses;
1567 + char expr_tag[100]; /* Energize */
1569 check_stub_type (type);
1574 fprint_symbol (stream, TYPE_FIELD_NAME (type, i));
1575 fputs_filtered (" = ", stream);
1578 + sprintf(expr_tag, ".%s", TYPE_FIELD_NAME(type, i));
1580 + energize_start_variable_annotation(expr_tag, NULL,
1581 + TYPE_FIELD_TYPE(type, i),
1582 + (CORE_ADDR) (valaddr + TYPE_FIELD_BITPOS(type, i) / 8),
1584 if (TYPE_FIELD_PACKED (type, i))
1590 valaddr + TYPE_FIELD_BITPOS (type, i) / 8,
1591 0, stream, format, 0, recurse + 1, pretty);
1593 + energize_end_variable_annotation();
1601 /* Number of repetitions we have detected so far. */
1603 + char expr_tag[100]; /* Energize */
1613 + sprintf(expr_tag, "[%d]", i);
1614 + energize_start_variable_annotation(expr_tag, NULL,
1616 + (CORE_ADDR) (valaddr + i * eltlen),
1618 if (reps > REPEAT_COUNT_THRESHOLD)
1620 val_print (elttype, valaddr + i * eltlen,
1622 Sun Oct 24 23:48:55 1993*** 841,846 ****
1624 recurse + 1, pretty);
1627 + energize_end_variable_annotation();
1630 fprintf_filtered (stream, "...");
1634 fprintf_filtered (stream, "&");
1635 type_print_varspec_prefix (TYPE_FN_FIELD_TYPE (f, j), stream, 0, 0);
1636 ! fprintf (stream, kind);
1637 if (TYPE_FN_FIELD_PHYSNAME (f, j)[0] == '_'
1638 && TYPE_FN_FIELD_PHYSNAME (f, j)[1] == CPLUS_MARKER)
1639 type_print_method_args
1642 fprintf_filtered (stream, "&");
1643 type_print_varspec_prefix (TYPE_FN_FIELD_TYPE (f, j), stream, 0, 0);
1644 ! fprintf_filtered (stream, kind);
1645 if (TYPE_FN_FIELD_PHYSNAME (f, j)[0] == '_'
1646 && TYPE_FN_FIELD_PHYSNAME (f, j)[1] == CPLUS_MARKER)
1647 type_print_method_args
1651 case TYPE_CODE_METHOD:
1653 ! fprintf (stream, "(");
1654 type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0,
1659 case TYPE_CODE_METHOD:
1661 ! fprintf_filtered (stream, "(");
1662 type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0,
1667 if (TYPE_TARGET_TYPE (TYPE_FN_FIELD_TYPE (f, j)) == 0)
1669 /* Keep GDB from crashing here. */
1670 ! fprintf (stream, "<undefined type> %s;\n",
1671 TYPE_FN_FIELD_PHYSNAME (f, j));
1675 if (TYPE_TARGET_TYPE (TYPE_FN_FIELD_TYPE (f, j)) == 0)
1677 /* Keep GDB from crashing here. */
1678 ! fprintf_filtered (stream, "<undefined type> %s;\n",
1679 TYPE_FN_FIELD_PHYSNAME (f, j));
1688 "\"set print\" must be followed by the name of a print subcommand.\n");
1689 help_list (setprintlist, "set print ", -1, stdout);
1696 "\"set print\" must be followed by the name of a print subcommand.\n");
1697 help_list (setprintlist, "set print ", -1, stdout);
1699 ===================================================================
1700 *** 1.5 1992/09/26 08:07:45
1701 --- amix.mh 1992/09/28 21:34:15
1706 # SVR4 puts the BSD compatible install in /usr/ucb.
1707 INSTALL = /usr/ucb/install -c
1709 + # These are the libs that are needed for the Energize version of gdb on
1710 + # SVR4. Note that we MUST include the standard C library before libucb.a,
1711 + # otherwise we get lots of broken stuff we don't want.
1712 + ENERGIZE_LIB = energize/libconn.a
1713 + ENERGIZE_LIBS = ${ENERGIZE_LIB} -L/usr/lib -lm -lnet -lresolv -lform \
1714 + -lsocket -lc /usr/ucblib/libucb.a -lnsl
1716 + # These are the libs that are needed for the Energize version of gdb on
1717 + # SVR4. Note that we MUST include the standard C library before libucb.a,
1718 + # otherwise we get lots of broken stuff we don't want.
1719 + ENERGIZE_LIB = energize/libconn.a
1720 + ENERGIZE_LIBS = ${ENERGIZE_LIB} -L/usr/lib -lm -lnet -lresolv -lform \
1721 + -lsocket -lc /usr/ucblib/libucb.a -lnsl
1722 ===================================================================
1723 *** 1.5 1992/09/26 08:08:14
1724 --- ncr3000.mh 1992/09/28 21:34:16
1728 # The /usr/ucb/install program is incompatible (complains about unknown
1729 # group staff). Use good old cp...
1732 + # These are the libs that are needed for the Energize version of gdb on
1733 + # SVR4. Note that we MUST include the standard C library before libucb.a,
1734 + # otherwise we get lots of broken stuff we don't want.
1735 + XM_CLIBS = -L/usr/lib -lm -lnet -lresolv -lform -lsocket -lnsl -lc
1737 + # These are the libs that are needed for the Energize version of gdb on
1738 + # SVR4. Note that we MUST include the standard C library before libucb.a,
1739 + # otherwise we get lots of broken stuff we don't want.
1740 + ENERGIZE_LIB = energize/libconn.a
1741 + ENERGIZE_LIBS = ${ENERGIZE_LIB} -L/usr/lib -lm -lnet -lresolv -lform \
1742 + -lsocket -lc /usr/ucblib/libucb.a -lnsl
1744 + # These are the libs that are needed for the Energize version of gdb on
1745 + # SVR4. Note that we MUST include the standard C library before libucb.a,
1746 + # otherwise we get lots of broken stuff we don't want.
1747 + ENERGIZE_LIB = energize/libconn.a
1748 + ENERGIZE_LIBS = ${ENERGIZE_LIB} -L/usr/lib -lm -lnet -lresolv -lform \
1749 + -lsocket -lc /usr/ucblib/libucb.a -lnsl