|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T x
Length: 17137 (0x42f1) Types: TextFile Names: »xgdb.gdb.PAT«
└─⟦a05ed705a⟧ Bits:30007078 DKUUG GNU 2/12/89 └─⟦e10a7c8ba⟧ »./UNRELEASED/xgdb.tar.Z« └─⟦ae30648b5⟧ └─⟦this⟧ »./xgdb.gdb.PAT«
diff -c dist-gdb/breakpoint.c gdb/breakpoint.c *** dist-gdb/breakpoint.c Mon Jan 16 11:03:34 1989 --- gdb/breakpoint.c Thu Jun 22 14:50:19 1989 *************** *** 107,112 static void delete_breakpoint (); void clear_momentary_breakpoints (); void breakpoint_auto_delete (); \f /* condition N EXP -- set break condition of breakpoint N to EXP. */ --- 107,113 ----- static void delete_breakpoint (); void clear_momentary_breakpoints (); void breakpoint_auto_delete (); + extern int frame_file_full_name; \f /* condition N EXP -- set break condition of breakpoint N to EXP. */ *************** *** 732,737 b = set_raw_breakpoint (sal); b->number = ++breakpoint_count; b->cond = cond; if (tempflag) b->enable = temporary; --- 733,743 ----- b = set_raw_breakpoint (sal); b->number = ++breakpoint_count; b->cond = cond; + + /* added by PCS to support xgdb */ + if(frame_file_full_name && b->number >= 0) + printf("breakpoint #%d set\n",b->number); + if (tempflag) b->enable = temporary; *************** *** 940,945 free_command_lines (&bpt->commands); if (bpt->cond) free (bpt->cond); free (bpt); } --- 946,954 ----- free_command_lines (&bpt->commands); if (bpt->cond) free (bpt->cond); + /* added by PCS to support xgdb */ + if(frame_file_full_name && bpt->number >= 0) + printf("breakpoint #%d deleted\n",bpt->number); free (bpt); } *************** *** 1076,1081 struct breakpoint *bpt; { bpt->enable = enabled; check_duplicates (bpt->address); } --- 1085,1093 ----- struct breakpoint *bpt; { bpt->enable = enabled; + /* added by PCS to support xgdb */ + if(frame_file_full_name && bpt->number >= 0) + printf("breakpoint #%d enabled\n",bpt->number); check_duplicates (bpt->address); } *************** *** 1092,1098 struct breakpoint *bpt; { bpt->enable = disabled; ! check_duplicates (bpt->address); } --- 1104,1112 ----- struct breakpoint *bpt; { bpt->enable = disabled; ! /* added by PCS to support xgdb */ ! if(frame_file_full_name && bpt->number >= 0) ! printf("breakpoint #%d disabled\n",bpt->number); check_duplicates (bpt->address); } diff -c dist-gdb/infcmd.c gdb/infcmd.c *** dist-gdb/infcmd.c Thu Jan 19 15:16:46 1989 --- gdb/infcmd.c Sat Jul 1 19:22:57 1989 *************** *** 778,786 so user can read the output. */ if (addr_exp == 0 && i > 0 && i % 16 == 0) { ! printf ("--Type Return to print more--"); ! fflush (stdout); ! gdb_read_line (0, 0); } /* Get the data in raw format, then convert also to virtual format. */ --- 778,784 ----- so user can read the output. */ if (addr_exp == 0 && i > 0 && i % 16 == 0) { ! page_break(); } /* Get the data in raw format, then convert also to virtual format. */ diff -c dist-gdb/infrun.c gdb/infrun.c *** dist-gdb/infrun.c Mon Jan 30 10:38:14 1989 --- gdb/infrun.c Sat Jul 1 19:24:48 1989 *************** *** 1213,1221 QUIT; if (i > 0 && i % 16 == 0) { ! printf ("[Type Return to see more]"); ! fflush (stdout); ! gdb_read_line (0, 0); } printf ("%d\t", i); printf ("%s\t", signal_stop[i] ? "Yes" : "No"); --- 1213,1219 ----- QUIT; if (i > 0 && i % 16 == 0) { ! page_break(); } printf ("%d\t", i); printf ("%s\t", signal_stop[i] ? "Yes" : "No"); diff -c dist-gdb/main.c gdb/main.c *** dist-gdb/main.c Wed Jan 25 16:59:23 1989 --- gdb/main.c Sat Jul 1 19:26:03 1989 *************** *** 429,434 { } /* Read commands from `instream' and execute them until end of file. */ void --- 429,444 ----- { } + /* Print a page break, if desired */ + page_break() + { + if (isatty(0)) { + printf("--Type Return to print more--"); + fflush (stdout); + gdb_read_line (0, 0); + } + } + /* Read commands from `instream' and execute them until end of file. */ void *************** *** 819,828 Specifically, we want to make sure that you have the right to give\n\ away copies of GDB, that you receive source code or else can get it\n\ if you want it, that you can change GDB or use pieces of it in new\n\ ! free programs, and that you know you can do these things.\n\ ! --Type Return to print more--"); ! fflush (stdout); ! gdb_read_line (0, 0); printf ("\ To make sure that everyone has such rights, we have to forbid you to\n\ --- 829,836 ----- Specifically, we want to make sure that you have the right to give\n\ away copies of GDB, that you receive source code or else can get it\n\ if you want it, that you can change GDB or use pieces of it in new\n\ ! free programs, and that you know you can do these things.\n"); ! page_break(); printf ("\ To make sure that everyone has such rights, we have to forbid you to\n\ *************** *** 839,848 \n\ Therefore we (Richard Stallman and the Free Software Foundation,\n\ Inc.) make the following terms which say what you must do to be\n\ ! allowed to distribute or change GDB.\n\ ! --Type Return to print more--"); ! fflush (stdout); ! gdb_read_line (0, 0); printf ("\ COPYING POLICIES\n\ --- 847,854 ----- \n\ Therefore we (Richard Stallman and the Free Software Foundation,\n\ Inc.) make the following terms which say what you must do to be\n\ ! allowed to distribute or change GDB.\n"); ! page_break(); printf ("\ COPYING POLICIES\n\ *************** *** 862,871 Paragraph 1 above, provided that you also do the following:\n\ \n\ a) cause the modified files to carry prominent notices stating\n\ ! that you changed the files and the date of any change; and\n\ ! --Type Return to print more--"); ! fflush (stdout); ! gdb_read_line (0, 0); printf ("\ b) cause the whole of any work that you distribute or publish,\n\ --- 868,875 ----- Paragraph 1 above, provided that you also do the following:\n\ \n\ a) cause the modified files to carry prominent notices stating\n\ ! that you changed the files and the date of any change; and\n"); ! page_break(); printf ("\ b) cause the whole of any work that you distribute or publish,\n\ *************** *** 891,900 \n\ Mere aggregation of another unrelated program with this program (or its\n\ derivative) on a volume of a storage or distribution medium does not bring\n\ ! the other program under the scope of these terms.\n\ ! --Type Return to print more--"); ! fflush (stdout); ! gdb_read_line (0, 0); printf ("\ 3. You may copy and distribute GDB (or a portion or derivative of it,\n\ --- 895,902 ----- \n\ Mere aggregation of another unrelated program with this program (or its\n\ derivative) on a volume of a storage or distribution medium does not bring\n\ ! the other program under the scope of these terms.\n"); ! page_break(); printf ("\ 3. You may copy and distribute GDB (or a portion or derivative of it,\n\ *************** *** 920,929 For an executable file, complete source code means all the source code for\n\ all modules it contains; but, as a special exception, it need not include\n\ source code for modules which are standard libraries that accompany the\n\ ! operating system on which the executable file runs.\n\ ! --Type Return to print more--"); ! fflush (stdout); ! gdb_read_line (0, 0); printf ("\ 4. You may not copy, sublicense, distribute or transfer GDB\n\ --- 922,929 ----- For an executable file, complete source code means all the source code for\n\ all modules it contains; but, as a special exception, it need not include\n\ source code for modules which are standard libraries that accompany the\n\ ! operating system on which the executable file runs.\n"); ! page_break(); printf ("\ 4. You may not copy, sublicense, distribute or transfer GDB\n\ diff -c dist-gdb/printcmd.c gdb/printcmd.c *** dist-gdb/printcmd.c Fri Jan 20 11:49:09 1989 --- gdb/printcmd.c Thu Jun 22 14:56:57 1989 *************** *** 1457,1462 vprintf (string, arg_bytes); } \f extern struct cmd_list_element *enablelist, *disablelist, *deletelist; extern struct cmd_list_element *cmdlist, *setlist; --- 1457,1507 ----- vprintf (string, arg_bytes); } \f + /* added by PCS to support xgdb X-WINDOWS front-end to gdb */ + asdump_command() + { + register struct block *bl; + register CORE_ADDR pc; + CORE_ADDR get_frame_pc(); + struct block *block_for_pc(); + struct frame_info *get_frame_info(); + FRAME frame, get_current_frame(); + #ifdef PCS + #ifndef mips + register int insn; + int done = 0; + #endif /* mips */ + #endif + + frame = get_current_frame(); + pc = get_frame_pc(get_frame_info(frame)); + if((bl = block_for_pc(pc)) == 0) { + printf("not found\n"); + return; + } + fprintf(stdout,"ASDUMP_START\n"); + for(pc=(CORE_ADDR)bl->startaddr + FUNCTION_START_OFFSET; pc<=(CORE_ADDR)bl->endaddr;) { + #ifdef PCS + #ifndef mips + insn = 0xffff & read_memory_integer ((pc), 2); + if(insn == 0x4e75 /* rts */) + done = 1; + #endif /* mips */ + #endif + fprintf(stdout,"0x%x ",pc); + pc += print_insn(pc, stdout); + fprintf(stdout,"\n"); + #ifdef PCS + #ifndef mips + if(done) + break; + #endif /* mips */ + #endif + } + fprintf(stdout,"ASDUMP_END\n"); + } + + extern struct cmd_list_element *enablelist, *disablelist, *deletelist; extern struct cmd_list_element *cmdlist, *setlist; *************** *** 1576,1580 EXP may be preceded with /FMT, where FMT is a format letter\n\ but no count or size letter (see \"x\" command).")); add_com_alias ("p", "print", class_vars, 1); } --- 1621,1627 ----- EXP may be preceded with /FMT, where FMT is a format letter\n\ but no count or size letter (see \"x\" command).")); add_com_alias ("p", "print", class_vars, 1); + /* added by PCS */ + add_com ("asdump", class_vars, asdump_command, + "*Dump the assembler code for an entire function, intended only for use by xgdb."); } *************** *** 1577,1580 but no count or size letter (see \"x\" command).")); add_com_alias ("p", "print", class_vars, 1); } - --- 1625,1627 ----- add_com ("asdump", class_vars, asdump_command, "*Dump the assembler code for an entire function, intended only for use by xgdb."); } diff -c dist-gdb/source.c gdb/source.c *** dist-gdb/source.c Fri Dec 9 13:36:27 1988 --- gdb/source.c Thu Jun 22 14:57:34 1989 *************** *** 433,439 get_filename_and_charpos (s, line, 0); if (s->fullname == 0) return 0; ! printf ("\032\032%s:%d:%d:%s\n", s->fullname, line, s->line_charpos[line - 1], mid_statement ? "middle" : "beg"); current_source_line = line; --- 433,440 ----- get_filename_and_charpos (s, line, 0); if (s->fullname == 0) return 0; ! /* printing out the pc added by PCS to support xgdb */ ! printf ("\032\032%s:%d:%d:%s:0x%x\n", s->fullname, line, s->line_charpos[line - 1], mid_statement ? "middle" : "beg", get_frame_pc(get_frame_info(get_current_frame()))); *************** *** 435,441 return 0; printf ("\032\032%s:%d:%d:%s\n", s->fullname, line, s->line_charpos[line - 1], ! mid_statement ? "middle" : "beg"); current_source_line = line; first_line_listed = line; last_line_listed = line; --- 436,443 ----- /* printing out the pc added by PCS to support xgdb */ printf ("\032\032%s:%d:%d:%s:0x%x\n", s->fullname, line, s->line_charpos[line - 1], ! mid_statement ? "middle" : "beg", ! get_frame_pc(get_frame_info(get_current_frame()))); current_source_line = line; first_line_listed = line; last_line_listed = line; diff -c dist-gdb/stack.c gdb/stack.c *** dist-gdb/stack.c Thu Dec 29 07:08:46 1988 --- gdb/stack.c Thu Jun 22 14:57:54 1989 *************** *** 69,74 print_frame_info (fi, level, source, 1); } void print_frame_info (fi, level, source, args) struct frame_info *fi; --- 69,77 ----- print_frame_info (fi, level, source, 1); } + /* added by PCS to support xgdb */ + static int frame_changed; + void print_frame_info (fi, level, source, args) struct frame_info *fi; *************** *** 92,98 funname = misc_function_vector[misc_index].name; } ! if (source >= 0 || !sal.symtab) { if (level >= 0) printf ("#%-2d ", level); --- 95,102 ----- funname = misc_function_vector[misc_index].name; } ! /* frame_changed added by PCS to support xgdb */ ! if (frame_changed || source >= 0 || !sal.symtab) { if (level >= 0) printf ("#%-2d ", level); *************** *** 96,101 { if (level >= 0) printf ("#%-2d ", level); if (fi->pc != sal.pc || !sal.symtab) printf ("0x%x in ", fi->pc); printf ("%s (", funname ? funname : "??"); --- 100,108 ----- { if (level >= 0) printf ("#%-2d ", level); + /* added by PCS to support xgdb */ + else if(frame_changed) + printf ("#%-2d ", 0); if (fi->pc != sal.pc || !sal.symtab) printf ("0x%x in ", fi->pc); printf ("%s (", funname ? funname : "??"); *************** *** 110,116 printf ("\n"); } ! if (source != 0 && sal.symtab) { int done = 0; int mid_statement = source < 0 && fi->pc != sal.pc; --- 117,124 ----- printf ("\n"); } ! /* frame_changed added by PCS to support xgdb */ ! if ((frame_changed || source != 0) && sal.symtab) { int done = 0; int mid_statement = source < 0 && fi->pc != sal.pc; *************** *** 124,129 } current_source_line = max (sal.line - 5, 1); } if (source != 0) set_default_breakpoint (1, fi->pc, sal.symtab, sal.line); --- 132,139 ----- } current_source_line = max (sal.line - 5, 1); } + /* added by PCS to support xgdb */ + frame_changed = 0; if (source != 0) set_default_breakpoint (1, fi->pc, sal.symtab, sal.line); *************** *** 673,678 select_frame (frame, selected_frame_level + count - count1); print_stack_frame (selected_frame, selected_frame_level, 1); } /* Select the frame down one or COUNT stack levels --- 683,690 ----- select_frame (frame, selected_frame_level + count - count1); print_stack_frame (selected_frame, selected_frame_level, 1); + /* added by PCS to support xgdb */ + frame_changed++; } /* Select the frame down one or COUNT stack levels *************** *** 694,699 select_frame (frame, selected_frame_level + count - count1); print_stack_frame (selected_frame, selected_frame_level, 1); } \f static void --- 706,713 ----- select_frame (frame, selected_frame_level + count - count1); print_stack_frame (selected_frame, selected_frame_level, 1); + /* added by PCS to support xgdb */ + frame_changed++; } \f static void diff -c dist-gdb/symtab.c gdb/symtab.c *** dist-gdb/symtab.c Sat Mar 18 19:55:43 1989 --- gdb/symtab.c Sat Jul 1 19:24:11 1989 *************** *** 1705,1713 column = 0; if (++rows_output >= 21) { ! printf ("--Type Return to print more--"); ! fflush (stdout); ! gdb_read_line (0, 0); rows_output = 0; } } --- 1705,1711 ----- column = 0; if (++rows_output >= 21) { ! page_break(); rows_output = 0; } } *************** *** 1761,1767 #define MORE \ { print_count++; \ if (print_count >= 21) \ ! { printf ("--Type Return to print more--"); \ print_count = 0; \ fflush (stdout); \ gdb_read_line (0, 0); } } --- 1759,1765 ----- #define MORE \ { print_count++; \ if (print_count >= 21) \ ! { \ print_count = 0; \ page_break(); } } *************** *** 1763,1770 if (print_count >= 21) \ { printf ("--Type Return to print more--"); \ print_count = 0; \ ! fflush (stdout); \ ! gdb_read_line (0, 0); } } static void sort_block_syms (); --- 1761,1767 ----- if (print_count >= 21) \ { print_count = 0; \ ! page_break(); } } static void sort_block_syms (); *************** *** 1885,1891 print_count++; if (print_count >= 21) { - printf ("--Type Return to print more--"); print_count = 0; fflush (stdout); gdb_read_line (0, 0); --- 1882,1887 ----- print_count++; if (print_count >= 21) { print_count = 0; page_break(); } *************** *** 1887,1894 { printf ("--Type Return to print more--"); print_count = 0; ! fflush (stdout); ! gdb_read_line (0, 0); } } #endif --- 1883,1889 ----- if (print_count >= 21) { print_count = 0; ! page_break(); } } #endif