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 *** 1.4 1992/06/10 02:05:16
7 --- config/amix.mh 1992/07/21 20:18:16
12 # SVR4 puts the BSD compatible install in /usr/ucb.
13 INSTALL = /usr/ucb/install -c
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 + ENERGIZE_LIB = energize/libconn.a
19 + ENERGIZE_LIBS = ${ENERGIZE_LIB} -L/usr/lib -lm -lnet -lresolv -lform \
20 + -lsocket -lc /usr/ucblib/libucb.a -lnsl
22 + # These are the libs that are needed for the Energize version of gdb on
23 + # SVR4. Note that we MUST include the standard C library before libucb.a,
24 + # otherwise we get lots of broken stuff we don't want.
25 + ENERGIZE_LIB = energize/libconn.a
26 + ENERGIZE_LIBS = ${ENERGIZE_LIB} -L/usr/lib -lm -lnet -lresolv -lform \
27 + -lsocket -lc /usr/ucblib/libucb.a -lnsl
28 ===================================================================
29 *** 1.4 1992/06/15 19:25:13
30 --- config/ncr3000.mh 1992/09/15 01:51:32
34 # The /usr/ucb/install program is incompatible (complains about unknown
35 # group staff). Use good old cp...
38 + # These are the libs that are needed for the Energize version of gdb on
39 + # SVR4. Note that we MUST include the standard C library before libucb.a,
40 + # otherwise we get lots of broken stuff we don't want.
41 + XM_CLIBS = -L/usr/lib -lm -lnet -lresolv -lform -lsocket -lnsl -lc
43 + # These are the libs that are needed for the Energize version of gdb on
44 + # SVR4. Note that we MUST include the standard C library before libucb.a,
45 + # otherwise we get lots of broken stuff we don't want.
46 + ENERGIZE_LIB = energize/libconn.a
47 + ENERGIZE_LIBS = ${ENERGIZE_LIB} -L/usr/lib -lm -lnet -lresolv -lform \
48 + -lsocket -lc /usr/ucblib/libucb.a -lnsl
50 + # These are the libs that are needed for the Energize version of gdb on
51 + # SVR4. Note that we MUST include the standard C library before libucb.a,
52 + # otherwise we get lots of broken stuff we don't want.
53 + ENERGIZE_LIB = energize/libconn.a
54 + ENERGIZE_LIBS = ${ENERGIZE_LIB} -L/usr/lib -lm -lnet -lresolv -lform \
55 + -lsocket -lc /usr/ucblib/libucb.a -lnsl
56 ===================================================================
57 *** 2.70 1992/09/03 16:25:59
58 --- .Sanitize 1992/09/15 05:19:46
71 ===================================================================
72 *** 1.181 1992/09/08 22:33:31
73 --- Makefile.in 1992/09/15 05:21:40
77 READLINE_DEP = $$(READLINE_DIR)
78 RL_LIB = ./../readline${subdir}/libreadline.a
80 + # Energize libraries. Works slightly differently than other libraries
81 + # because it is a gdb subdir and we try to build the energize library
82 + # if it doesn't exist, unlike readline, bfd, mmalloc, etc. Note
83 + # that SDIR and BDIR will be different if we configured with -srcdir.
84 + ENERGIZE_DIR = energize
85 + ENERGIZE_LIB = ${ENERGIZE_DIR}/libconn.a
87 # All the includes used for CFLAGS and for lint.
88 # -I. for config files.
89 # -I${srcdir} possibly for regex.h also.
92 # {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs.
93 # TERMCAP comes after readline, since readline depends on it.
94 CLIBS = ${BFD_LIB} ${RL_LIB} ${TERMCAP} ${OPCODES} ${MMALLOC_LIB} ${LIBIBERTY} \
95 ! ${XM_CLIBS} ${TM_CLIBS}
96 CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${BFD_LIB} ${OPCODES} ${MMALLOC_LIB} ${LIBIBERTY} \
97 ${RL_LIB} ${MMALLOC_LIB}
99 ADD_FILES = ${REGEX} ${ALLOCA} ${XM_ADD_FILES} ${TM_ADD_FILES}
100 ! ADD_DEPS = ${REGEX1} ${ALLOCA1} ${XM_ADD_FILES} ${TM_ADD_FILES}
105 # {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs.
106 # TERMCAP comes after readline, since readline depends on it.
107 CLIBS = ${BFD_LIB} ${RL_LIB} ${TERMCAP} ${OPCODES} ${MMALLOC_LIB} ${LIBIBERTY} \
108 ! ${ENERGIZE_LIB} ${XM_CLIBS} ${TM_CLIBS}
109 CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${BFD_LIB} ${OPCODES} ${MMALLOC_LIB} ${LIBIBERTY} \
110 ${RL_LIB} ${MMALLOC_LIB}
112 ADD_FILES = ${REGEX} ${ALLOCA} ${XM_ADD_FILES} ${TM_ADD_FILES}
113 ! ADD_DEPS = ${REGEX1} ${ALLOCA1} ${XM_ADD_FILES} ${TM_ADD_FILES} \
120 mem-break.c target.c inftarg.c \
121 dbxread.c coffread.c elfread.c dwarfread.c xcoffread.c stabsread.c \
122 ieee-float.c language.c parse.c buildsym.c objfiles.c \
123 ! minsyms.c mipsread.c maint.c
125 # Source files in subdirectories (which will be handled separately by
128 mem-break.c target.c inftarg.c \
129 dbxread.c coffread.c elfread.c dwarfread.c xcoffread.c stabsread.c \
130 ieee-float.c language.c parse.c buildsym.c objfiles.c \
131 ! minsyms.c mipsread.c maint.c energize.c
133 # Source files in subdirectories (which will be handled separately by
137 command.o utils.o expprint.o environ.o version.o gdbtypes.o \
138 copying.o $(DEPFILES) mem-break.o target.o \
139 inftarg.o ieee-float.o putenv.o parse.o language.o $(YYOBJ) \
140 ! buildsym.o objfiles.o minsyms.o maint.o demangle.o \
141 dbxread.o coffread.o elfread.o dwarfread.o xcoffread.o mipsread.o \
145 command.o utils.o expprint.o environ.o version.o gdbtypes.o \
146 copying.o $(DEPFILES) mem-break.o target.o \
147 inftarg.o ieee-float.o putenv.o parse.o language.o $(YYOBJ) \
148 ! buildsym.o objfiles.o minsyms.o maint.o demangle.o energize.o \
149 dbxread.o coffread.o elfread.o dwarfread.o xcoffread.o mipsread.o \
155 NTSSTART = kdb-start.o
159 # For now, shortcut the "configure GDB for fewer languages" stuff.
160 YYFILES = c-exp.tab.c m2-exp.tab.c
163 NTSSTART = kdb-start.o
165 ! SUBDIRS = doc ${ENERGIZE_DIR}
167 # For now, shortcut the "configure GDB for fewer languages" stuff.
168 YYFILES = c-exp.tab.c m2-exp.tab.c
172 #load `echo " "$(DEPFILES) | sed -e 's/\.o/.c/g' -e 's, , ../,g'`
173 echo "Load .c corresponding to:" $(DEPFILES)
176 + @(cd ${ENERGIZE_DIR}; \
178 + "against=$(against)" \
180 + "AR_FLAGS=$(AR_FLAGS)" \
182 + "CFLAGS=$(CFLAGS)" \
183 + "RANLIB=$(RANLIB)" \
184 + "MAKEINFO=$(MAKEINFO)" \
185 + "INSTALL=$(INSTALL)" \
186 + "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
187 + "INSTALL_DATA=$(INSTALL_DATA)" \
190 # This is useful when debugging GDB, because some Unix's don't let you run GDB
191 # on itself without copying the executable. So "make gdb1" will make
192 ===================================================================
193 *** 1.46 1992/09/15 06:27:18
194 --- breakpoint.c 1992/09/15 06:33:37
198 b->cond_string = NULL;
200 printf_filtered ("Breakpoint %d now unconditional.\n", bnum);
201 + energize_condition_breakpoint(b);
208 typed in or the decompiled expression. */
209 b->cond_string = savestring (arg, strlen (arg));
210 b->cond = parse_exp_1 (&arg, block_for_pc (b->address), 0);
211 + energize_condition_breakpoint(b);
213 error ("Junk at end of expression");
218 if (b->number == bnum)
220 ! if (from_tty && input_from_terminal_p ())
221 printf_filtered ("Type commands for when breakpoint %d is hit, one per line.\n\
222 End with a line saying just \"end\".\n", bnum);
223 l = read_command_lines ();
224 free_command_lines (&b->commands);
228 error ("No breakpoint number %d.", bnum);
231 if (b->number == bnum)
233 ! if ((from_tty && input_from_terminal_p ()) || energize)
234 printf_filtered ("Type commands for when breakpoint %d is hit, one per line.\n\
235 End with a line saying just \"end\".\n", bnum);
236 l = read_command_lines ();
237 free_command_lines (&b->commands);
239 + energize_commands_breakpoint(b);
242 error ("No breakpoint number %d.", bnum);
249 + energize_ignore_breakpoint(b);
257 struct breakpoint *b;
259 + energize_create_breakpoint(b);
267 register struct breakpoint *b;
270 + energize_delete_breakpoint(bpt);
273 target_remove_breakpoint(bpt->address, bpt->shadow_contents);
278 if (b->number == bptnum)
280 b->ignore_count = count;
281 + energize_ignore_breakpoint(b);
287 struct breakpoint *b;
290 ! b->ignore_count = 0;
293 /* Command to set ignore-count of breakpoint N to COUNT. */
295 struct breakpoint *b;
299 ! b->ignore_count = 0;
300 ! energize_ignore_breakpoint(b);
304 /* Command to set ignore-count of breakpoint N to COUNT. */
309 bpt->enable = enabled;
311 + energize_enable_breakpoint(bpt);
313 if (xgdb_verbose && bpt->type == bp_breakpoint)
314 printf_filtered ("breakpoint #%d enabled\n", bpt->number);
319 disable_breakpoint (bpt)
320 struct breakpoint *bpt;
322 + energize_disable_breakpoint(bpt);
324 bpt->enable = disabled;
326 if (xgdb_verbose && bpt->type == bp_breakpoint)
327 ===================================================================
328 *** 1.18 1992/07/10 17:22:30
329 --- command.c 1992/07/23 01:42:36
334 error ("gdb internal error: bad cmd_type in do_setshow_command");
335 (*c->function.sfunc) (NULL, from_tty, c);
340 /* Show all the settings in a list of show commands. */
346 ! while ((rc = wait (&status)) != pid && rc != -1)
349 error ("Fork failed");
354 ! while ((rc = energize_wait (&status)) != pid && rc != -1)
357 error ("Fork failed");
358 ===================================================================
359 *** 1.63 1992/09/03 16:26:02
360 --- configure.in 1992/09/15 05:19:56
366 target_dependent=true
368 ! configdirs="energize doc"
371 target_dependent=true
372 ===================================================================
373 *** 1.46 1992/09/15 06:26:58
374 --- defs.h 1992/09/15 06:29:55
378 #define MAINTENANCE_CMDS 1
381 + #include "energize.h"
383 #endif /* !defined (DEFS_H) */
384 ===================================================================
385 *** 2.5 1992/09/03 16:26:03
386 --- demangle.c 1992/09/15 05:19:59
389 the appropriate target configuration file. */
391 #ifndef DEFAULT_DEMANGLING_STYLE
392 ! # define DEFAULT_DEMANGLING_STYLE AUTO_DEMANGLING_STYLE_STRING
395 /* String name for the current demangling style. Set by the "set demangling"
397 the appropriate target configuration file. */
399 #ifndef DEFAULT_DEMANGLING_STYLE
400 ! # define DEFAULT_DEMANGLING_STYLE LUCID_DEMANGLING_STYLE_STRING
403 /* String name for the current demangling style. Set by the "set demangling"
404 ===================================================================
405 *** 1.28 1992/07/23 04:41:45
406 --- inflow.c 1992/08/27 22:43:15
409 static short pgrp_inferior;
410 static short pgrp_ours;
411 # else /* not def SHORT_PGRP */
412 ! static int pgrp_inferior;
413 static int pgrp_ours;
414 # endif /* not def SHORT_PGRP */
415 #else /* not def TIOCGPGRP */
417 static short pgrp_inferior;
418 static short pgrp_ours;
419 # else /* not def SHORT_PGRP */
421 static int pgrp_ours;
422 # endif /* not def SHORT_PGRP */
423 #else /* not def TIOCGPGRP */
424 ===================================================================
425 *** 1.54 1992/09/02 09:22:09
426 --- infrun.c 1992/09/15 05:20:09
430 Here we must get it up to actual execution of the real program. */
432 inferior_pid = pid; /* Needed for wait_for_inferior stuff below */
433 + energize_new_process();
435 clear_proceed_status ();
443 + energize_new_process();
444 push_target (&child_ops);
446 mark_breakpoints_out ();
447 ===================================================================
448 *** 1.11 1992/03/29 23:21:27
449 --- inftarg.c 1992/09/15 06:37:01
456 ! pid = proc_wait (status);
458 ! pid = wait (status);
460 if (pid == -1) /* No more children to wait for */
462 fprintf (stderr, "Child process unexpectedly missing.\n");
467 ! pid = energize_wait (status);
468 if (pid == -1) /* No more children to wait for */
470 fprintf (stderr, "Child process unexpectedly missing.\n");
471 ===================================================================
472 *** 1.52 1992/09/15 06:27:10
473 --- main.c 1992/09/15 06:30:03
477 char *corearg = NULL;
480 + char *energize_id = NULL;
482 /* Pointers to all arguments of +command option. */
487 {"tty", required_argument, 0, 't'},
488 {"baud", required_argument, 0, 'b'},
489 {"b", required_argument, 0, 'b'},
490 + {"context", required_argument, 0, 12},
491 /* Allow machine descriptions to add more options... */
492 #ifdef ADDITIONAL_OPTIONS
501 + energize_id = optarg;
510 /* Run the init function of each source file */
512 + /* Must call this first to setup tty */
513 + energize_initialize (energize_id, execarg);
515 initialize_cmd_lists (); /* This needs to be done first */
516 initialize_all_files ();
517 initialize_main (); /* But that omits this file! Do it now */
520 if (!setjmp (to_top_level))
522 do_cleanups (ALL_CLEANUPS); /* Do complete cleanup */
524 quit_command ((char *)0, instream == stdin);
528 if (!setjmp (to_top_level))
530 do_cleanups (ALL_CLEANUPS); /* Do complete cleanup */
532 ! energize_main_loop();
535 quit_command ((char *)0, instream == stdin);
540 else if (c->function.cfunc == NO_FUNCTION)
541 error ("That is not a command, just a help topic.");
543 ! (*c->function.cfunc) (arg, from_tty & caution);
546 /* Tell the user if the language has changed (except first time). */
548 else if (c->function.cfunc == NO_FUNCTION)
549 error ("That is not a command, just a help topic.");
551 ! energize_call_command (c, arg, from_tty & caution);
554 /* Tell the user if the language has changed (except first time). */
560 ! p = command_line_input ((char *) NULL, instream == stdin);
562 /* Treat end of file like "end". */
568 ! p = energize_command_line_input ((char *) NULL, instream == stdin);
570 /* Treat end of file like "end". */
572 ===================================================================
573 *** 1.32 1992/09/15 06:27:00
574 --- printcmd.c 1992/09/15 06:30:06
579 int histindex = record_latest_value (val);
585 + sprintf(buf, "$%d", histindex);
586 + energize_start_variable_annotation(buf, NULL, VALUE_TYPE(val),
587 + VALUE_ADDRESS(val), "");
591 printf_filtered ("\031(gdb-makebuffer \"%s\" %d '(\"", exp, histindex);
596 if (histindex >= 0) printf_filtered ("$%d = ", histindex);
598 print_formatted (val, format, fmt.size);
599 + energize_end_variable_annotation();
600 printf_filtered ("\n");
602 printf_filtered("\") )\030");
606 standard indentation here is 4 spaces, and val_print indents
607 2 for each recurse. */
608 val = read_var_value (sym, FRAME_INFO_ID (fi));
610 + energize_start_variable_annotation(SYMBOL_NAME(sym), sym,
612 + VALUE_ADDRESS(val), "");
615 val_print (VALUE_TYPE (val), VALUE_CONTENTS (val), VALUE_ADDRESS (val),
616 stream, 0, 0, 2, Val_no_prettyprint);
618 fputs_filtered ("???", stream);
620 + energize_end_variable_annotation();
625 ===================================================================
626 *** 1.34 1992/09/11 09:11:04
627 --- stack.c 1992/09/15 05:20:25
631 printf_filtered ("%s in ", local_hex_string(fi->pc));
633 ! fputs_demangled (fname, stdout, 0);
634 fputs_filtered (" (...)\n", stdout);
639 printf_filtered ("%s in ", local_hex_string(fi->pc));
642 ! energize_annotate_function(fname, 0, level);
644 ! fputs_demangled (fname, stdout, 0);
645 fputs_filtered (" (...)\n", stdout);
651 if (fi->pc != sal.pc || !sal.symtab)
652 printf_filtered ("%s in ", local_hex_string(fi->pc));
653 ! fputs_demangled (funname ? funname : "??", stdout, 0);
655 fputs_filtered (" (", stdout);
659 if (fi->pc != sal.pc || !sal.symtab)
660 printf_filtered ("%s in ", local_hex_string(fi->pc));
662 ! energize_annotate_function(funname ? funname : "??", 0, level);
664 ! fputs_demangled (funname ? funname : "??", stdout, 0);
666 fputs_filtered (" (", stdout);
671 if (addressprint && mid_statement)
672 printf_filtered ("%s\t", local_hex_string(fi->pc));
673 ! print_source_lines (sal.symtab, sal.line, sal.line + 1, 0);
675 current_source_line = max (sal.line - lines_to_list/2, 1);
679 if (addressprint && mid_statement)
680 printf_filtered ("%s\t", local_hex_string(fi->pc));
682 ! print_source_lines (sal.symtab, sal.line, sal.line + 1, 0);
684 current_source_line = max (sal.line - lines_to_list/2, 1);
690 printf_filtered (" in ");
691 ! fputs_demangled (funname, stdout, DMGL_ANSI | DMGL_PARAMS);
698 printf_filtered (" in ");
700 ! energize_annotate_function(funname, DMGL_ANSI | DMGL_PARAMS,
701 ! selected_frame_level);
703 ! fputs_demangled (funname, stdout, DMGL_ANSI | DMGL_PARAMS);
707 ===================================================================
708 *** 1.57 1992/09/15 06:27:08
709 --- symfile.c 1992/09/15 06:30:09
716 + energize_symbol_file(objfile);
721 ===================================================================
722 *** 1.54 1992/09/15 06:27:03
723 --- valprint.c 1992/09/15 06:30:13
727 struct type **dont_print;
729 int i, len, n_baseclasses;
730 + char expr_tag[100]; /* Energize */
732 check_stub_type (type);
737 fprint_symbol (stream, TYPE_FIELD_NAME (type, i));
738 fputs_filtered (" = ", stream);
741 + sprintf(expr_tag, ".%s", TYPE_FIELD_NAME(type, i));
743 + energize_start_variable_annotation(expr_tag, NULL,
744 + TYPE_FIELD_TYPE(type, i),
745 + (CORE_ADDR) (valaddr + TYPE_FIELD_BITPOS(type, i) / 8),
747 if (TYPE_FIELD_PACKED (type, i))
753 valaddr + TYPE_FIELD_BITPOS (type, i) / 8,
754 0, stream, format, 0, recurse + 1, pretty);
756 + energize_end_variable_annotation();
764 /* Number of repetitions we have detected so far. */
766 + char expr_tag[100]; /* Energize */
776 + sprintf(expr_tag, "[%d]", i);
777 + energize_start_variable_annotation(expr_tag, NULL,
779 + (CORE_ADDR) (valaddr + i * eltlen),
781 if (reps > REPEAT_COUNT_THRESHOLD)
783 val_print (elttype, valaddr + i * eltlen,
787 recurse + 1, pretty);
790 + energize_end_variable_annotation();
793 fprintf_filtered (stream, "...");