diff options
author | gdb-3.4 <gdb@fsf.org> | 1989-11-05 21:02:37 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2012-06-03 15:36:32 +0100 |
commit | 1c997a4ae86938343edb715efc3fc742c5f668fe (patch) | |
tree | 9e3c70728a3987732436b7fa4b4cfef433a0669a /gdb | |
parent | 4187119d59afd156703cfcbc6be287c5085f1867 (diff) | |
download | gdb-1c997a4ae86938343edb715efc3fc742c5f668fe.zip gdb-1c997a4ae86938343edb715efc3fc742c5f668fe.tar.gz gdb-1c997a4ae86938343edb715efc3fc742c5f668fe.tar.bz2 |
gdb-3.4
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 124 | ||||
-rw-r--r-- | gdb/Makefile.dist | 12 | ||||
-rw-r--r-- | gdb/README | 44 | ||||
-rw-r--r-- | gdb/TAGS | 816 | ||||
-rw-r--r-- | gdb/blockframe.c | 10 | ||||
-rw-r--r-- | gdb/breakpoint.c | 1 | ||||
-rw-r--r-- | gdb/coffread.c | 6 | ||||
-rwxr-xr-x | gdb/config.gdb | 51 | ||||
-rw-r--r-- | gdb/core.c | 8 | ||||
-rw-r--r-- | gdb/dbxread.c | 230 | ||||
-rw-r--r-- | gdb/default-dep.c | 19 | ||||
-rw-r--r-- | gdb/eval.c | 2 | ||||
-rw-r--r-- | gdb/frame.h | 2 | ||||
-rw-r--r-- | gdb/gdb.texinfo | 20 | ||||
-rw-r--r-- | gdb/hp300bsd-dep.c | 21 | ||||
-rw-r--r-- | gdb/i386-dep.c | 59 | ||||
-rw-r--r-- | gdb/inflow.c | 15 | ||||
-rw-r--r-- | gdb/infrun.c | 34 | ||||
-rw-r--r-- | gdb/isi-dep.c | 624 | ||||
-rw-r--r-- | gdb/m-convex.h | 18 | ||||
-rw-r--r-- | gdb/m-i386-sv32.h (renamed from gdb/m-i386-sysv3.2.h) | 0 | ||||
-rw-r--r-- | gdb/m-i386.h | 29 | ||||
-rw-r--r-- | gdb/m-i386g-sv32.h (renamed from gdb/m-i386gas-sysv3.2.h) | 0 | ||||
-rw-r--r-- | gdb/m-sparc.h | 2 | ||||
-rw-r--r-- | gdb/m-vax.h | 34 | ||||
-rw-r--r-- | gdb/m68k-pinsn.c | 4 | ||||
-rw-r--r-- | gdb/main.c | 30 | ||||
-rw-r--r-- | gdb/printcmd.c | 6 | ||||
-rw-r--r-- | gdb/readline/ChangeLog | 15 | ||||
-rw-r--r-- | gdb/readline/Makefile | 4 | ||||
-rw-r--r-- | gdb/readline/funmap.c | 5 | ||||
-rw-r--r-- | gdb/readline/readline.c | 122 | ||||
-rw-r--r-- | gdb/readline/vi_mode.c | 3 | ||||
-rw-r--r-- | gdb/stack.c | 48 | ||||
-rw-r--r-- | gdb/symtab.c | 8 | ||||
-rw-r--r-- | gdb/utils.c | 6 | ||||
-rw-r--r-- | gdb/valops.c | 7 | ||||
-rw-r--r-- | gdb/version.c | 2 |
38 files changed, 1820 insertions, 621 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7bef1f0..d0bfbe1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,129 @@ +Sun Nov 5 11:39:01 1989 Jim Kingdon (kingdon at hobbes.ai.mit.edu) + + * version.c: Change version to 3.4 + + * symtab.c (decode_line_1): Only skip past "struct" if it + is there. + + * valops.c (value_ind), eval.c (evaluate_subexp, case UNOP_IND): + Have "*" <int-valued-exp> return an int, not a LONGEST. + + * utils.c (fprintf_filtered): Pass arg{4,5,6} to sprintf. + + * printcmd.c (x_command): Use variable itself rather + than treating it as a pointer only if it is a function. + (See comment "this makes x/i main work"). + + * coffread.c (symbol_file_command): Use error for + "%s does not have a symbol-table.\n". + +Wed Nov 1 19:56:18 1989 Jim Kingdon (kingdon at hobbes.ai.mit.edu) + + * dbxread.c [BELIEVE_PCC_PROMOTION_TYPE]: New code. + m-sparc.h: Define BELIEVE_PCC_PROMOTION_TYPE. + +Thu Oct 26 12:45:00 1989 Jim Kingdon (kingdon at hobbes.ai.mit.edu) + + * infrun.c: Include <sys/dir.h>. + + * dbxread.c (read_dbx_symtab, case N_LSYM, case 'T'): + Check for enum types and put constants in psymtab. + +Mon Oct 23 15:02:25 1989 Jim Kingdon (kingdon at hobbes.ai.mit.edu) + + * dbxread.c (define_symbol, read_dbx_symtab): Handle enum + constants (e.g. "b:c=e6,0"). + +Thu Oct 19 14:57:26 1989 Jim Kingdon (kingdon at hobbes.ai.mit.edu) + + * stack.c (frame_info): Use FRAME_ARGS_ADDRESS_CORRECT + m-vax.h (FRAME_ARGS_ADDRESS_CORRECT): New macro. + (FRAME_ARGS_ADDRESS): Restore old meaning. + + * frame.h (Frame_unknown): New macro. + stack.c (frame_info): Check for Frame_unknown return from + FRAME_ARGS_ADDRESS. + m-vax.h (FRAME_ARGS_ADDRESS): Sometimes return Frame_unknown. + + * utils.c (fatal_dump_core): Add "internal error" to message. + + * infrun.c (IN_SIGTRAMP): New macro. + (wait_for_inferior): Use IN_SIGTRAMP. + m-vax.h (IN_SIGTRAMP): New macro. + +Wed Oct 18 15:09:22 1989 Jim Kingdon (kingdon at hobbes.ai.mit.edu) + + * config.gdb, Makefile.dist: Shorten m-i386-sv32.h. + + * coffread.c (symbol_file_command): Pass 0 to select_source_symtab. + +Tue Oct 17 12:24:41 1989 Jim Kingdon (kingdon at hobbes.ai.mit.edu) + + * i386-dep.c (i386_frame_num_args): Take function from m-i386.h + file. Check for pfi null. + m-i386.h (FRAME_NUM_ARGS): Use i386_frame_num_args. + + * infrun.c (wait_for_inferior): set stop_func_name to 0 + before calling find_pc_partial_function. + +Thu Oct 12 01:08:50 1989 Jim Kingdon (kingdon at hobbes.ai.mit.edu) + + * breakpoint.c (_initialize_breakpoint): Add "disa". + + * Makefile.dist: Add GLOBAL_CFLAGS and pass to readline. + + * config.gdb (various): "$machine =" -> "machine =". + +Wed Oct 11 11:54:31 1989 Jim Kingdon (kingdon at hobbes.ai.mit.edu) + + * inflow.c (try_writing_regs): #if 0 out this function. + + * main.c (main): Add "-help" option. + + * dbxread.c (read_dbx_symtab): Merge code for N_FUN with + N_STSYM, etc. + +Mon Oct 9 14:21:55 1989 Jim Kingdon (kingdon at hobbes.ai.mit.edu) + + * inflow.c (try_writing_regs_command): Don't write past end + of struct user. + + * dbxread.c (read_struct_type): #if 0 out code which checks for + bitpos and bitsize 0. + + * config.gdb: Accept sequent-i386 (not seq386). + (symmetry): Set depfile and paramfile. + + * m-convex.h (IGNORE_SYMBOL): Check for N_MONPT if defined. + +Thu Oct 5 10:14:26 1989 Jim Kingdon (kingdon at hobbes.ai.mit.edu) + + * default-dep.c (read_inferior_memory): Put #if 0'd out comment + within /* */. + +Wed Oct 4 18:44:41 1989 Jim Kingdon (kingdon at apple-gunkies.ai.mit.edu) + + * config.gdb: Change /dev/null to m-i386.h for various + 386 machine "opcodefile" entries. + + * config.gdb: Accept seq386 for sequent symmetry. + +Mon Oct 2 09:59:50 1989 Jim Kingdon (kingdon at hobbes.ai.mit.edu) + + * hp300bsd-dep.c: Fix copyright notice. + +Sun Oct 1 16:25:30 1989 Jim Kingdon (kingdon at hobbes.ai.mit.edu) + + * Makefile.dist (DEPFILES): Add isi-dep.c. + + * default-dep.c (read_inferior_memory): Move #endif after else. + Sat Sep 30 12:50:16 1989 Jim Kingdon (kingdon at hobbes.ai.mit.edu) + * version.c: Change version number to 3.3.xxx. + + * GDB 3.3 released. + * version.c: Change version number to 3.3. * Makefile.dist (READLINE): Add vi_mode.c diff --git a/gdb/Makefile.dist b/gdb/Makefile.dist index 751145d..d142d0f 100644 --- a/gdb/Makefile.dist +++ b/gdb/Makefile.dist @@ -40,8 +40,9 @@ CC-LD=${CC} #define M_CFLAGS #endif -CFLAGS = -g -I. ${HAVE_VPRINTF_DEFINE} M_CFLAGS -/* CFLAGS = -I. -g -pg ${HAVE_VPRINTF_DEFINE} */ +/* CFLAGS for both GDB and readline. */ +GLOBAL_CFLAGS = -g M_CFLAGS +CFLAGS = -I. ${HAVE_VPRINTF_DEFINE} ${GLOBAL_CFLAGS} /* None of the things in CFLAGS will do any harm, and on some systems (e.g. SunOS4) it is important to use the M_CFLAGS. */ LDFLAGS = $(CFLAGS) @@ -122,7 +123,7 @@ SFILES = blockframe.c breakpoint.c dbxread.c coffread.c command.c core.c \ DEPFILES = umax-dep.c gould-dep.c default-dep.c sun3-dep.c \ sparc-dep.c hp9k320-dep.c hp300bsd-dep.c news-dep.c i386-dep.c \ - symmetry-dep.c convex-dep.c altos-dep.c + symmetry-dep.c convex-dep.c altos-dep.c isi-dep.c PINSNS = gld-pinsn.c i386-pinsn.c sparc-pinsn.c vax-pinsn.c m68k-pinsn.c \ ns32k-pinsn.c convex-pinsn.c @@ -135,7 +136,7 @@ OPCODES = m68k-opcode.h pn-opcode.h sparc-opcode.h npl-opcode.h vax-opcode.h \ ns32k-opcode.h convex-opcode.h MFILES = m-hp9k320.h m-hp300bsd.h m-i386.h m-i386gas.h \ - m-i386-sysv3.2.h m-i386gas-sysv3.2.h m-isi.h m-merlin.h \ + m-i386-sv32.h m-i386g-sv32.h m-isi.h m-merlin.h \ m-altos.h m-news.h m-newsos3.h m-npl.h m-pn.h \ m-sparc.h m-sun2.h m-sun3.h m-sun2os4.h \ m-sun3os4.h m-sun4os4.h m-umax.h m-vax.h m-symmetry.h m-convex.h @@ -286,7 +287,8 @@ expread.o : expread.tab.c defs.h param.h symtab.h frame.h expression.h mv expread.tab.o expread.o readline/libreadline.a : force_update - cd readline ; ${MAKE} "SYSV=${SYSV_DEFINE}" "CC=${CC}" libreadline.a + cd readline ; ${MAKE} "SYSV=${SYSV_DEFINE}" \ + "DEBUG_FLAGS=${GLOBAL_CFLAGS}" "CC=${CC}" libreadline.a force_update : @@ -19,14 +19,17 @@ emacs 18.55 or later. About languages other than C... -C++ support has been integrated into gdb. GDB should work with Pascal -and FORTRAN programs, but I am not aware of anyone who is working on -getting it to use the syntax of any language other than C or C++. +C++ support has been integrated into gdb. GDB should work with +FORTRAN programs (if you have problem, please send a bug report), but +I am not aware of anyone who is working on getting it to use the +syntax of any language other than C or C++. Pascal programs which use +sets, subranges, file variables, or nested functions will not +currently work. About -gg format... Currently GDB version 3.x does *not* support GCC's -gg format. This -is because it is (in theory) has fast enough startup on dbx debugging +is because it (in theory) has fast enough startup on dbx debugging format object files that -gg format is unnecessary (and hence undesirable, since it wastes space and processing power in gcc). I would like to hear people's opinions on the amount of time currently @@ -97,30 +100,31 @@ operating system-dependent). If this is unavoidable, put a hook in the machine-independent file which calls a (possibly) machine-dependent macro (for example, the IGNORE_SYMBOL macro can be used for any symbols which need to be ignored on a specific machine. -Calling IGNORE_SYMBOL in dbxread.c is a lot cleaner than a maze of -#if defined's). The machine-independent code should do whatever "most" -machines want if the macro is not defined in param.h. Using #if defined -can sometimes be OK (e.g. SET_STACK_LIMIT_HUGE) but should usually be +Calling IGNORE_SYMBOL in dbxread.c is a lot cleaner than a maze of #if +defined's). The machine-independent code should do whatever "most" +machines want if the macro is not defined in param.h. Using #if +defined can sometimes be OK (e.g. SET_STACK_LIMIT_HUGE) but should be conditionalized on a specific feature of an operating system (set in -param.h) rather than something like #if defined(vax) or #if defined(SYSV). +param.h) rather than something like #if defined(vax) or #if +defined(SYSV). It is better to replace entire routines which may be system-specific, rather than put in a whole bunch of hooks which are probably not going to be helpful for any purpose other than your changes. For example, if you want to modify dbxread.c to deal with DBX debugging symbols -which are in COFF files rather than a.out files, do something +which are in COFF files rather than BSD a.out files, do something along the lines of a macro GET_NEXT_SYMBOL, which could have different definitions for COFF and a.out, rather than trying to put the necessary changes throughout all the code in dbxread.c that -currently assumes a.out format. +currently assumes BSD format. Please avoid duplicating code. For example, if something needs to be changed in read_inferior_memory, it is very painful because there is a -copy in every dep.c file. The correct way to do this is to put the -standard ptrace interfaces in a separate file ptrace.c, which is used -by all systems which have ptrace. ptrace.c would deal with variations -between systems the same way any system-independent file would (hooks, -#if defined, etc.). +copy in every dep.c file. The correct way to do this is to put (in +this case) the standard ptrace interfaces in a separate file ptrace.c, +which is used by all systems which have ptrace. ptrace.c would deal +with variations between systems the same way any system-independent +file would (hooks, #if defined, etc.). About debugging gdb with itself... @@ -128,11 +132,9 @@ You probably want to do a "make TAGS" after you configure your distribution; this will put the machine dependent routines for your local machine where they will be accessed first by a M-period . -Also, you want to make sure that gdb is not compiled with shared -libraries on the Sun 4. And you want to make sure that you've -compiled gdb with your local cc or taken appropriate precautions -regarding ansification of include files. See the Makefile for more -information. +Also, make sure that you've compiled gdb with your local cc or taken +appropriate precautions regarding ansification of include files. See +the Makefile for more information. The "info" command, when executed without a subcommand in a gdb being debugged by gdb, will pop you back up to the top level gdb. See @@ -2,48 +2,48 @@ dbxread.c,2354 #define IGNORE_SYMBOL(164,4914 #define IGNORE_SYMBOL(169,5028 -#define MAX_OF_TYPE(4957,136182 -#define MIN_OF_TYPE(4958,136235 +#define MAX_OF_TYPE(5113,141022 +#define MIN_OF_TYPE(5114,141075 #define READ_FILE_HEADERS(211,6321 #define READ_FILE_HEADERS(218,6571 #define READ_STRING_TABLE_SIZE(197,5872 #define SET_ELEMENT_P(85,2728 #define STAB_REG_TO_REGNUM(264,8007 #define TYPE_OF_SET_ELEMENT(86,2788 -_initialize_dbxread 5237,144381 +_initialize_dbxread 5393,149221 add_bincl_to_list 1824,50638 -add_file_command 3525,97352 +add_file_command 3616,99938 add_new_header_file 686,20412 add_old_header_file 657,19394 add_symbol_to_list 867,25287 add_this_object_header_file 637,18767 -add_undefined_type 3904,108372 -cleanup_undefined_types 3920,108815 +add_undefined_type 4073,113549 +cleanup_undefined_types 4089,113992 compare_misc_functions 1399,39494 -compare_psymbols 2571,70005 +compare_psymbols 2662,72591 compare_symbols 1487,41458 -condense_addl_misc_bunches 3322,91797 +condense_addl_misc_bunches 3413,94383 condense_misc_bunches 1428,40167 -copy_pending 5201,143523 +copy_pending 5357,148363 dbx_alloc_type 814,24174 dbx_create_type 797,23649 dbx_lookup_type 746,22223 -define_symbol 3661,100810 +define_symbol 3778,104025 discard_misc_bunches 1412,39806 -end_psymtab 2595,70719 +end_psymtab 2686,73305 end_symtab 1207,34565 explicit_lookup_type 846,24755 -fill_in_vptr_fieldno 5189,143190 +fill_in_vptr_fieldno 5345,148030 fill_symbuf 1764,48931 find_corresponding_bincl_psymtab 1849,51331 finish_block 932,26830 -fix_common_block 5223,144077 - for 2521,68680 +fix_common_block 5379,148917 + for 2612,71266 free_bincl_list 1867,51719 free_header_files 612,18133 get_sym_file 1740,48273 -hash_symsegs 3059,84015 -hashname 3032,83492 +hash_symsegs 3150,86601 +hashname 3123,86078 init_bincl_list 1812,50383 init_header_files 599,17782 init_misc_functions 1361,38562 @@ -54,28 +54,28 @@ next_symbol_text 1780,49407 obconcat 508,14582 obsavestring 486,14075 pop_subfile 1319,37721 -process_one_symbol 3090,84833 -psymtab_to_symtab(2736,74790 -psymtab_to_symtab_1 2673,73083 +process_one_symbol 3181,87419 +psymtab_to_symtab(2827,77376 +psymtab_to_symtab_1 2764,75669 push_subfile 1305,37370 -read_addl_syms 3365,92819 -read_args 5147,142033 -read_array_type 4797,131732 +read_addl_syms 3456,95405 +read_args 5303,146873 +read_array_type 4953,136572 read_dbx_symtab 1891,52496 -read_enum_type 4874,133737 -read_number 5108,141320 -read_ofile_symtab 2918,79777 -read_range_type 4961,136307 -read_struct_type 4300,118149 -read_type 3997,110898 -read_type_number 3970,110243 +read_enum_type 5030,138577 +read_number 5264,146160 +read_ofile_symtab 3009,82363 +read_range_type 5117,141147 +read_struct_type 4445,122700 +read_type 4142,115449 +read_type_number 3758,103693 really_free_pendings 896,26045 record_line 1065,30528 record_misc_function 1369,38676 -scan_file_globals 2845,77745 +scan_file_globals 2936,80331 sort_syms 1508,42042 sort_symtab_syms 1517,42168 -start_psymtab 2540,69215 +start_psymtab 2631,71801 start_subfile 1149,32781 start_symtab 1096,31315 symbol_file_command 1557,43492 @@ -83,13 +83,13 @@ xxmalloc 470,13738 blockframe.c,647 #define FRAMELESS_LOOK_FOR_PROLOGUE(163,4369 -_initialize_blockframe 587,15557 +_initialize_blockframe 595,15906 block_for_pc 351,9907 -block_innermost_frame 566,15144 +block_innermost_frame 574,15493 create_new_frame 80,2165 find_pc_function 422,11439 -find_pc_misc_function 521,13741 -find_pc_partial_function 437,11845 +find_pc_misc_function 529,14090 +find_pc_partial_function 445,12194 flush_cached_frames 132,3234 get_current_block 311,9005 get_current_frame 64,1933 @@ -154,48 +154,48 @@ until_break_command 803,20231 dbxread.c,2354 #define IGNORE_SYMBOL(164,4914 #define IGNORE_SYMBOL(169,5028 -#define MAX_OF_TYPE(4957,136182 -#define MIN_OF_TYPE(4958,136235 +#define MAX_OF_TYPE(5113,141022 +#define MIN_OF_TYPE(5114,141075 #define READ_FILE_HEADERS(211,6321 #define READ_FILE_HEADERS(218,6571 #define READ_STRING_TABLE_SIZE(197,5872 #define SET_ELEMENT_P(85,2728 #define STAB_REG_TO_REGNUM(264,8007 #define TYPE_OF_SET_ELEMENT(86,2788 -_initialize_dbxread 5237,144381 +_initialize_dbxread 5393,149221 add_bincl_to_list 1824,50638 -add_file_command 3525,97352 +add_file_command 3616,99938 add_new_header_file 686,20412 add_old_header_file 657,19394 add_symbol_to_list 867,25287 add_this_object_header_file 637,18767 -add_undefined_type 3904,108372 -cleanup_undefined_types 3920,108815 +add_undefined_type 4073,113549 +cleanup_undefined_types 4089,113992 compare_misc_functions 1399,39494 -compare_psymbols 2571,70005 +compare_psymbols 2662,72591 compare_symbols 1487,41458 -condense_addl_misc_bunches 3322,91797 +condense_addl_misc_bunches 3413,94383 condense_misc_bunches 1428,40167 -copy_pending 5201,143523 +copy_pending 5357,148363 dbx_alloc_type 814,24174 dbx_create_type 797,23649 dbx_lookup_type 746,22223 -define_symbol 3661,100810 +define_symbol 3778,104025 discard_misc_bunches 1412,39806 -end_psymtab 2595,70719 +end_psymtab 2686,73305 end_symtab 1207,34565 explicit_lookup_type 846,24755 -fill_in_vptr_fieldno 5189,143190 +fill_in_vptr_fieldno 5345,148030 fill_symbuf 1764,48931 find_corresponding_bincl_psymtab 1849,51331 finish_block 932,26830 -fix_common_block 5223,144077 - for 2521,68680 +fix_common_block 5379,148917 + for 2612,71266 free_bincl_list 1867,51719 free_header_files 612,18133 get_sym_file 1740,48273 -hash_symsegs 3059,84015 -hashname 3032,83492 +hash_symsegs 3150,86601 +hashname 3123,86078 init_bincl_list 1812,50383 init_header_files 599,17782 init_misc_functions 1361,38562 @@ -206,35 +206,35 @@ next_symbol_text 1780,49407 obconcat 508,14582 obsavestring 486,14075 pop_subfile 1319,37721 -process_one_symbol 3090,84833 -psymtab_to_symtab(2736,74790 -psymtab_to_symtab_1 2673,73083 +process_one_symbol 3181,87419 +psymtab_to_symtab(2827,77376 +psymtab_to_symtab_1 2764,75669 push_subfile 1305,37370 -read_addl_syms 3365,92819 -read_args 5147,142033 -read_array_type 4797,131732 +read_addl_syms 3456,95405 +read_args 5303,146873 +read_array_type 4953,136572 read_dbx_symtab 1891,52496 -read_enum_type 4874,133737 -read_number 5108,141320 -read_ofile_symtab 2918,79777 -read_range_type 4961,136307 -read_struct_type 4300,118149 -read_type 3997,110898 -read_type_number 3970,110243 +read_enum_type 5030,138577 +read_number 5264,146160 +read_ofile_symtab 3009,82363 +read_range_type 5117,141147 +read_struct_type 4445,122700 +read_type 4142,115449 +read_type_number 3758,103693 really_free_pendings 896,26045 record_line 1065,30528 record_misc_function 1369,38676 -scan_file_globals 2845,77745 +scan_file_globals 2936,80331 sort_syms 1508,42042 sort_symtab_syms 1517,42168 -start_psymtab 2540,69215 +start_psymtab 2631,71801 start_subfile 1149,32781 start_symtab 1096,31315 symbol_file_command 1557,43492 xxmalloc 470,13738 coffread.c,1153 -_initialize_coff 1997,51184 +_initialize_coff 1995,51136 add_symbol_to_list 239,6659 coff_alloc_type 216,6044 coff_lookup_type 191,5303 @@ -242,34 +242,34 @@ compare_misc_functions 574,15824 compare_symbols 643,17250 complete_symtab 420,11661 condense_misc_bunches 600,16328 -decode_base_type 1695,43602 -decode_function_type 1680,43270 -decode_type 1611,41633 +decode_base_type 1693,43554 +decode_function_type 1678,43222 +decode_type 1609,41585 discard_misc_bunches 587,16136 end_symtab 443,12339 -enter_linenos 1325,33811 -fill_in_vptr_fieldno 1976,50629 +enter_linenos 1323,33763 +fill_in_vptr_fieldno 1974,50581 finish_block 255,7053 -free_stringtab 1244,32313 -get_sym_file 830,22060 -getfilename 1272,32775 -getsymname 1252,32409 -hashname 1349,34504 -init_lineno 1301,33409 +free_stringtab 1242,32265 +get_sym_file 828,22012 +getfilename 1270,32727 +getsymname 1250,32361 +hashname 1347,34456 +init_lineno 1299,33361 init_misc_functions 530,14772 -init_stringtab 1207,31526 +init_stringtab 1205,31478 make_blockvector 334,9209 -patch_opaque_types 1397,35664 -patch_type 1370,34784 -process_coff_symbol 1458,37365 -psymtab_to_symtab 1989,50997 -read_aout_hdr 1143,30011 -read_coff_symtab 853,22645 -read_enum_type 1894,48302 -read_file_hdr 1106,29439 -read_one_sym 1177,30725 -read_section_hdr 1156,30264 -read_struct_type 1799,45905 +patch_opaque_types 1395,35616 +patch_type 1368,34736 +process_coff_symbol 1456,37317 +psymtab_to_symtab 1987,50949 +read_aout_hdr 1141,29963 +read_coff_symtab 851,22597 +read_enum_type 1892,48254 +read_file_hdr 1104,29391 +read_one_sym 1175,30677 +read_section_hdr 1154,30216 +read_struct_type 1797,45857 record_line 372,10317 record_misc_function 538,14886 sort_syms 655,17641 @@ -299,19 +299,19 @@ core.c,428 #define N_MAGIC(37,1073 #define N_MAGIC(39,1116 #define N_TXTADDR(56,1392 -_initialize_core(501,11926 -close_exec_file 161,3640 -files_info 222,4960 -get_exec_file 206,4709 -have_core_file_p 216,4899 -myread 457,11172 -read_memory 274,6239 -register_addr 484,11657 -reopen_exec_file 169,3729 -specify_exec_file_hook 150,3406 -validate_files 185,4128 -write_memory 298,6798 -xfer_core_file 324,7539 +_initialize_core(501,11938 +close_exec_file 161,3652 +files_info 222,4972 +get_exec_file 206,4721 +have_core_file_p 216,4911 +myread 457,11184 +read_memory 274,6251 +register_addr 484,11669 +reopen_exec_file 169,3741 +specify_exec_file_hook 150,3418 +validate_files 185,4140 +write_memory 298,6810 +xfer_core_file 324,7551 environ.c,205 environ_vector 87,2273 @@ -327,9 +327,9 @@ unset_in_environ 155,3497 eval.c,320 evaluate_expression 119,3366 evaluate_subexp 138,3760 -evaluate_subexp_for_address 888,25910 -evaluate_subexp_for_sizeof 983,28436 -evaluate_subexp_with_coercion 951,27623 +evaluate_subexp_for_address 888,25906 +evaluate_subexp_for_sizeof 983,28432 +evaluate_subexp_with_coercion 951,27619 evaluate_type 130,3614 parse_and_eval 62,1782 parse_and_eval_address 31,978 @@ -384,7 +384,7 @@ until_next_command 445,10390 write_pc 757,17808 inflow.c,335 -_initialize_inflow 500,11655 +_initialize_inflow 511,12264 create_inferior 365,8512 inferior_died 459,10830 kill_command 447,10602 @@ -395,116 +395,117 @@ terminal_init_inferior 109,2609 terminal_ours 193,4436 terminal_ours_1 202,4530 terminal_ours_for_output 180,4199 -try_writing_regs_command 474,11137 - -infrun.c,422 -_initialize_infrun 1340,40505 -attach_program 423,12649 -clear_proceed_status 238,7822 -handle_command 1135,33944 -insert_step_breakpoint 1113,33367 -normal_stop 1005,30118 -proceed 266,8680 -remove_step_breakpoint 1125,33669 -restore_inferior_status 1294,39027 -save_inferior_status 1263,37798 -signals_info 1222,36546 -start_inferior 358,11034 -start_remote 405,12289 -wait_for_inferior 447,13290 -writing_pc 345,10713 +try_writing_regs_command 479,11383 + +infrun.c,452 +#define IN_SIGTRAMP(166,5961 +_initialize_infrun 1366,41425 +attach_program 448,13556 +clear_proceed_status 263,8729 +handle_command 1161,34864 +insert_step_breakpoint 1139,34287 +normal_stop 1031,31038 +proceed 291,9587 +remove_step_breakpoint 1151,34589 +restore_inferior_status 1320,39947 +save_inferior_status 1289,38718 +signals_info 1248,37466 +start_inferior 383,11941 +start_remote 430,13196 +wait_for_inferior 472,14197 +writing_pc 370,11620 kdb-start.c,14 start 29,911 main.c,1395 #define ISATTY(47,1291 -add_com 1066,26905 -add_com_alias 1078,27132 -add_info 1034,26190 -add_info_alias 1045,26383 +add_com 1096,28194 +add_com_alias 1108,28421 +add_info 1064,27479 +add_info_alias 1075,27672 catch_errors 177,4170 -catch_termination 763,19120 -cd_command 1318,32114 -command_line_input 818,20970 -command_loop 495,12271 -define_command 1124,27925 +catch_termination 793,20409 +cd_command 1348,33403 +command_line_input 848,22259 +command_loop 525,13560 +define_command 1154,29214 disconnect 207,4712 -do_nothing 488,12171 -document_command 1164,28926 -dont_repeat 519,12935 -dump_me_command 1433,34141 -echo_command 1407,33757 -editing_info 1482,35163 -error_no_arg 1088,27330 -execute_command 445,11096 -float_handler 1665,39616 -free_command_lines 1016,25881 -gdb_readline 536,13456 -help_command 1095,27424 -info_command 1057,26711 -initialize_cmd_lists 1672,39713 -initialize_main 1686,40170 -initialize_signals 778,19567 -input_from_terminal_p 1297,31668 +do_nothing 518,13460 +document_command 1194,30215 +dont_repeat 549,14224 +dump_me_command 1463,35430 +echo_command 1437,35046 +editing_info 1512,36452 +error_no_arg 1118,28619 +execute_command 475,12385 +float_handler 1695,40905 +free_command_lines 1046,27170 +gdb_readline 566,14745 +help_command 1125,28713 +info_command 1087,28000 +initialize_cmd_lists 1702,41002 +initialize_main 1716,41459 +initialize_signals 808,20856 +input_from_terminal_p 1327,32957 main 231,5192 -parse_binary_operation 1443,34288 -print_gdb_version 1209,29850 -print_prompt 1229,30348 -pwd_command 1303,31739 -quit_command 1276,31154 -read_command_lines 965,24579 +parse_binary_operation 1473,35577 +print_gdb_version 1239,31139 +print_prompt 1259,31637 +pwd_command 1333,33028 +quit_command 1306,32443 +read_command_lines 995,25868 return_to_top_level 160,3706 -set_editing 1472,34921 -set_history 1596,38350 -set_history_expansion 1580,38024 -set_history_filename 1616,38738 -set_history_size 1605,38571 -set_history_write 1588,38193 -set_prompt_command 1238,30489 -set_verbose_command 1645,39221 +set_editing 1502,36210 +set_history 1626,39639 +set_history_expansion 1610,39313 +set_history_filename 1646,40027 +set_history_size 1635,39860 +set_history_write 1618,39482 +set_prompt_command 1268,31778 +set_verbose_command 1675,40510 source_cleanup 220,5004 -source_command 1378,33251 -stop_sig 711,17950 -symbol_completion_function 603,15200 -validate_comname 1103,27558 -verbose_info 1653,39371 -version_info 1219,30200 +source_command 1408,34540 +stop_sig 741,19239 +symbol_completion_function 633,16489 +validate_comname 1133,28847 +verbose_info 1683,40660 +version_info 1249,31489 printcmd.c,943 -_initialize_printcmd 1623,38100 +_initialize_printcmd 1625,38235 address_info 592,13980 -clear_displays 914,21618 -compare_ints 1208,27665 -containing_function_bounds 1537,35960 +clear_displays 916,21753 +compare_ints 1210,27800 +containing_function_bounds 1539,36095 decode_format 80,2251 -delete_display 929,21829 -disable_current_display 1082,25057 -disable_display 1067,24819 -disable_display_command 1160,26792 -disassemble_command 1563,36620 -display_command 851,20435 -display_info 1094,25338 -do_displays 1055,24569 +delete_display 931,21964 +disable_current_display 1084,25192 +disable_display 1069,24954 +disable_display_command 1162,26927 +disassemble_command 1565,36755 +display_command 853,20570 +display_info 1096,25473 +do_displays 1057,24704 do_examine 432,10303 -do_one_display 1000,23202 -enable_display 1121,26123 -free_display 902,21400 +do_one_display 1002,23337 +enable_display 1123,26258 +free_display 904,21535 output_command 553,13174 print_address 404,9676 print_command 513,12305 print_formatted 175,4422 -print_frame_args 1221,27981 -print_frame_nameless_args 1306,30230 +print_frame_args 1223,28116 +print_frame_nameless_args 1308,30365 print_scalar_formatted 218,5618 -print_variable_value 1198,27446 -printf_command 1331,30817 -ptype_command 766,18216 +print_variable_value 1200,27581 +printf_command 1333,30952 +ptype_command 768,18351 set_command 581,13730 set_next_address 389,9302 -undisplay_command 962,22446 +undisplay_command 964,22581 validate_format 498,11866 -whatis_command 738,17564 +whatis_command 740,17699 x_command 678,15908 remote.c,714 @@ -557,29 +558,29 @@ source_charpos_line 420,9931 source_line_charpos 406,9635 stack.c,657 -_initialize_stack 859,22042 -args_info 625,15676 -backtrace_command 432,11191 -backtrace_limit_info 418,10894 -down_command 792,20320 -find_relative_frame 682,17313 -frame_command 734,18898 -frame_info 308,8077 -get_selected_block 662,16609 -locals_info 569,14484 +_initialize_stack 879,22697 +args_info 645,16331 +backtrace_command 452,11846 +backtrace_limit_info 438,11549 +down_command 812,20975 +find_relative_frame 702,17968 +frame_command 754,19553 +frame_info 318,8503 +get_selected_block 682,17264 +locals_info 589,15139 parse_frame_specification 216,6084 -print_block_frame_locals 494,12726 -print_frame_arg_vars 578,14659 +print_block_frame_locals 514,13381 +print_frame_arg_vars 598,15314 print_frame_info 76,2220 -print_frame_local_vars 533,13684 +print_frame_local_vars 553,14339 print_sel_frame 191,5582 print_selected_frame 201,5792 print_stack_frame 59,1892 -record_selected_frame 650,16289 -return_command 811,20839 -select_frame 636,15968 -set_backtrace_limit_command 405,10622 -up_command 767,19616 +record_selected_frame 670,16944 +return_command 831,21494 +select_frame 656,16623 +set_backtrace_limit_command 425,11277 +up_command 787,20271 standalone.c,1177 _exit 434,8321 @@ -670,15 +671,15 @@ relocate_type 290,8487 relocate_typevector 270,7878 symtab.c,1477 -_initialize_symtab 2382,65276 +_initialize_symtab 2388,65501 block_function 1102,30299 -compare_symbols 2173,59132 -completion_list_add_symbol 2239,60743 -contained_in 2224,60473 +compare_symbols 2179,59357 +completion_list_add_symbol 2245,60968 +contained_in 2230,60698 create_array_type 604,16947 decode_line_1 1438,39022 -decode_line_2 1800,49861 -decode_line_spec 1785,49470 +decode_line_2 1806,50086 +decode_line_spec 1791,49695 find_line_common 1354,36778 find_line_pc 1289,34998 find_line_pc_range 1311,35530 @@ -687,16 +688,16 @@ find_pc_line_pc_range 1399,37601 find_pc_psymbol 765,21363 find_pc_psymtab 750,20994 find_pc_symtab 1114,30525 -functions_info 2150,58796 -init_type 2196,59740 -list_symbols 1974,53807 +functions_info 2156,59021 +init_type 2202,59965 +list_symbols 1980,54032 lookup_basetype_type 507,14022 lookup_block_symbol 1007,27715 lookup_enum 268,7169 lookup_function_type 569,15751 lookup_member_type 383,10719 lookup_method_type 437,12136 -lookup_misc_func 1897,52101 +lookup_misc_func 1903,52326 lookup_partial_symbol 945,26144 lookup_partial_symtab 165,4536 lookup_pointer_type 323,8661 @@ -709,57 +710,57 @@ lookup_symtab_1 86,2715 lookup_typename 183,4935 lookup_union 250,6688 lookup_unsigned_typename 214,5725 -make_symbol_completion_list 2264,61514 -methods_info 2164,58968 -output_source_filename 1912,52401 +make_symbol_completion_list 2270,61739 +methods_info 2170,59193 +output_source_filename 1918,52626 smash_to_function_type 724,20334 smash_to_member_type 658,18480 smash_to_method_type 675,18938 smash_to_pointer_type 631,17770 smash_to_reference_type 695,19530 -sort_block_syms 2185,59523 -sources_info 1940,52854 -types_info 2157,58884 -variables_info 2143,58708 +sort_block_syms 2191,59748 +sources_info 1946,53079 +types_info 2163,59109 +variables_info 2149,58933 utils.c,893 #define ISATTY(34,1102 -_initialize_utils 837,18051 -bcmp 738,16766 -bcopy 732,16693 -bzero 743,16830 -concat 315,7156 +_initialize_utils 839,18194 +bcmp 740,16909 +bcopy 734,16836 +bzero 745,16973 +concat 317,7281 discard_cleanups 96,2598 do_cleanups 80,2219 error 256,5801 fatal 272,6217 fatal_dump_core 286,6518 -fprintf_filtered 672,15357 -fputs_filtered 585,12889 +fprintf_filtered 674,15482 +fputs_filtered 587,13014 free_current_contents 134,3355 -getwd 750,16893 -index 757,16956 -insque 807,17512 +getwd 752,17036 +index 759,17099 +insque 809,17655 make_cleanup 60,1751 -parse_escape 384,8980 +parse_escape 386,9105 perror_with_name 172,4138 -print_spaces 327,7398 -print_spaces_filtered 716,16465 +print_spaces 329,7523 +print_spaces_filtered 718,16608 print_sys_errmsg 198,4697 -printchar 454,10140 -printf_filtered 707,16234 -prompt_for_continue 540,11786 -query 341,7762 +printchar 456,10265 +printf_filtered 709,16377 +prompt_for_continue 542,11911 +query 343,7887 quit 221,5137 -reinitialize_more_filter 551,12021 -remque 818,17676 +reinitialize_more_filter 553,12146 +remque 820,17819 request_quit 238,5472 restore_cleanups 119,3077 -rindex 765,17038 +rindex 767,17181 save_cleanups 109,2899 -savestring 304,6989 -screensize_info 558,12108 -set_screensize_command 500,11063 +savestring 306,7114 +screensize_info 560,12233 +set_screensize_command 502,11188 xmalloc 145,3568 xrealloc 157,3788 @@ -780,27 +781,27 @@ value_x_unop 294,8777 value_zerop 555,14239 valops.c,539 -call_function 511,14326 -check_field 991,27349 -destructor_name_p 964,26652 -push_bytes 433,12639 -push_word 413,12273 -typecmp 1186,32205 +call_function 514,14497 +check_field 994,27520 +destructor_name_p 967,26823 +push_bytes 436,12810 +push_word 416,12444 +typecmp 1189,32376 value_addr 354,10374 -value_arg_coerce 473,13432 -value_arg_push 496,13879 +value_arg_coerce 476,13603 +value_arg_push 499,14050 value_assign 113,3260 value_at 87,2594 value_cast 33,1132 value_coerce_array 326,9567 value_ind 381,11139 -value_of_this 1214,32888 +value_of_this 1217,33059 value_of_variable 316,9365 -value_push 452,12980 +value_push 455,13151 value_repeat 293,8780 -value_string 701,19888 -value_struct_elt 780,22216 -value_struct_elt_for_address 1072,29190 +value_string 704,20059 +value_struct_elt 783,22387 +value_struct_elt_for_address 1075,29361 value_zero 72,2297 valprint.c,462 @@ -931,19 +932,20 @@ resume 77,1915 store_inferior_registers 120,2930 write_inferior_memory 204,5370 -default-dep.c,331 -#define N_DATADDR(279,7305 +default-dep.c,363 +#define N_DATADDR(279,7329 #define N_SET_MAGIC(42,1176 -#define N_TXTADDR(275,7235 +#define N_TXTADDR(275,7259 call_ptrace 55,1511 -core_file_command 370,9358 -exec_file_command 475,12049 +core_file_command 370,9382 +exec_file_command 480,12313 fetch_inferior_registers 105,2409 kill_inferior 61,1634 kill_inferior_fast 74,1867 read_inferior_memory 172,4208 resume 89,2153 store_inferior_registers 132,3168 +write_inferior_memory 218,5717 sun3-dep.c,402 #define IS_OBJECT_FILE(313,8593 @@ -1004,14 +1006,20 @@ read_inferior_memory 256,6284 store_inferior_registers 211,5018 write_inferior_memory 294,7396 -hp300bsd-dep.c,200 -#define N_DATADDR(273,6789 -#define N_TXTADDR(269,6719 -core_file_command 362,8819 -exec_file_command 455,11105 - On failure 165,3796 -read_inferior_memory 169,3919 -write_inferior_memory 207,5039 +hp300bsd-dep.c,363 +#define N_DATADDR(288,7455 +#define N_SET_MAGIC(43,1174 +#define N_TXTADDR(284,7385 +call_ptrace 55,1488 +core_file_command 377,9485 +exec_file_command 470,11771 +fetch_inferior_registers 105,2414 +kill_inferior 61,1611 +kill_inferior_fast 74,1850 +read_inferior_memory 184,4585 +resume 89,2142 +store_inferior_registers 132,3189 +write_inferior_memory 222,5705 news-dep.c,352 #define N_DATADDR(310,8075 @@ -1028,12 +1036,12 @@ resume 79,1972 store_inferior_registers 126,3079 write_inferior_memory 249,6463 -i386-dep.c,1058 +i386-dep.c,1091 #define N_DATADDR(278,6990 #define N_SET_MAGIC(45,1190 #define N_SET_MAGIC(47,1250 #define N_TXTADDR(274,6920 -#define U_FPSTATE(1141,28570 +#define U_FPSTATE(1200,29992 call_ptrace 62,1570 codestream_fill 578,14567 #define codestream_get(574,14433 @@ -1042,23 +1050,24 @@ codestream_read 605,15129 codestream_seek 595,14935 #define codestream_tell(571,14263 core_file_command 365,8994 -double_to_i387 980,24581 +double_to_i387 1039,26003 exec_file_command 459,11340 fetch_inferior_registers 112,2468 -i386_float_info 1144,28611 +i386_float_info 1203,30033 i386_follow_jump 617,15344 -i386_frame_find_saved_regs 799,20070 +i386_frame_find_saved_regs 858,21492 +i386_frame_num_args 780,19198 i386_get_frame_setup 666,16376 -i386_pop_frame 890,22067 -i386_push_dummy_frame 877,21711 -i386_register_u_addr 929,23064 -i386_skip_prologue 850,21208 -i387_to_double 950,23630 +i386_pop_frame 949,23489 +i386_push_dummy_frame 936,23133 +i386_register_u_addr 988,24486 +i386_skip_prologue 909,22630 +i387_to_double 1009,25052 kill_inferior 68,1693 kill_inferior_fast 81,1926 -print_387_control_word 1014,25288 -print_387_status 1077,27021 -print_387_status_word 1051,26316 +print_387_control_word 1073,26710 +print_387_status 1136,28443 +print_387_status_word 1110,27738 read_inferior_memory 179,4266 resume 96,2212 static unsigned char codestream_buf[sizeof 567,14157 @@ -1168,6 +1177,23 @@ resume 97,2287 store_inferior_registers 140,3304 write_inferior_memory 218,5458 +isi-dep.c,399 +#define N_DATADDR(341,8528 +#define N_SET_MAGIC(44,1358 +#define N_TXTADDR(337,8458 +attach 78,2162 +call_ptrace 69,1961 +core_file_command 430,10558 +detach 94,2475 +exec_file_command 523,12844 +fetch_inferior_registers 170,3893 +kill_inferior 106,2674 +kill_inferior_fast 131,3166 +read_inferior_memory 237,5691 +resume 154,3621 +store_inferior_registers 197,4652 +write_inferior_memory 275,6803 + gld-pinsn.c,79 findarg(193,4447 findframe(223,5160 @@ -1221,15 +1247,15 @@ m68k-pinsn.c,408 #define NEXTPACKED(63,1837 #define NEXTSINGLE(53,1604 #define NEXTWORD(47,1444 -_initialize_pinsn(860,19535 -convert_from_68881 785,18049 -convert_to_68881 821,18826 +_initialize_pinsn(864,19795 +convert_from_68881 789,18309 +convert_to_68881 825,19086 fetch_arg 574,13657 print_base 763,17494 print_indexed 673,15446 print_insn 73,2231 print_insn_arg 167,4704 -sigemt(853,19470 +sigemt(857,19730 ns32k-pinsn.c,300 #define Adrmod_is_index(132,2910 @@ -1521,21 +1547,21 @@ m-hp300bsd.h,1067 #define STORE_STRUCT_RETURN(212,6752 #define vprintf(236,7634 -m-i386.h,1026 +m-i386.h,1025 #define ABOUT_TO_RETURN(119,3253 #define EXTRACT_RETURN_VALUE(234,6801 #define EXTRACT_STRUCT_VALUE_ADDRESS(247,7308 -#define FIX_CALL_DUMMY(357,10929 +#define FIX_CALL_DUMMY(330,10061 #define FRAMELESS_FUNCTION_INVOCATION(278,8412 #define FRAME_ARGS_ADDRESS(283,8590 #define FRAME_CHAIN(263,7867 #define FRAME_CHAIN_COMBINE(271,8120 #define FRAME_CHAIN_VALID(268,8003 -#define FRAME_FIND_SAVED_REGS(329,10148 +#define FRAME_FIND_SAVED_REGS(302,9280 #define FRAME_LOCALS_ADDRESS(285,8636 -#define FRAME_NUM_ARGS(295,8965 +#define FRAME_NUM_ARGS(290,8775 #define FRAME_SAVED_PC(281,8513 -#define INIT_STACK(388,11817 +#define INIT_STACK(361,10949 #define INVALID_FLOAT(124,3443 #define REGISTER_BYTE(183,5301 #define REGISTER_CONVERTIBLE(206,5845 @@ -1553,10 +1579,10 @@ m-i386.h,1026 m-i386gas.h,0 -m-i386-sysv3.2.h,26 +m-i386-sv32.h,26 #define U_FPSTATE(24,901 -m-i386gas-sysv3.2.h,26 +m-i386g-sv32.h,26 #define U_FPSTATE(24,904 m-isi.h,1086 @@ -1755,37 +1781,37 @@ m-pn.h,1077 #define STORE_STRUCT_RETURN(306,10794 m-sparc.h,1162 -#define ABOUT_TO_RETURN(106,3444 -#define EXTRACT_RETURN_VALUE(241,8115 -#define EXTRACT_STRUCT_VALUE_ADDRESS(254,8706 -#define FIX_CALL_DUMMY(666,25193 -#define FRAMELESS_FUNCTION_INVOCATION(328,11300 -#define FRAME_ARGS_ADDRESS(336,11556 -#define FRAME_CHAIN(315,10807 -#define FRAME_CHAIN_COMBINE(321,11008 -#define FRAME_CHAIN_VALID(318,10891 -#define FRAME_FIND_SAVED_REGS(370,12938 -#define FRAME_LOCALS_ADDRESS(340,11655 -#define FRAME_NUM_ARGS(347,11913 -#define FRAME_SAVED_PC(333,11445 -#define FRAME_STRUCT_ARGS_ADDRESS(338,11602 -#define GET_RWINDOW_REG(274,9201 -#define INIT_EXTRA_FRAME_INFO(308,10593 -#define INVALID_FLOAT(111,3599 -#define PC_ADJUST(76,2571 -#define REGISTER_BYTE(170,5982 -#define REGISTER_CONVERTIBLE(210,7117 -#define REGISTER_CONVERT_TO_RAW(221,7436 -#define REGISTER_CONVERT_TO_VIRTUAL(215,7253 -#define REGISTER_IN_WINDOW_P(182,6443 -#define REGISTER_RAW_SIZE(190,6653 -#define REGISTER_VIRTUAL_SIZE(197,6817 -#define REGISTER_VIRTUAL_TYPE(227,7606 -#define SAVED_PC_AFTER_CALL(79,2674 -#define SKIP_PROLOGUE(64,2127 -#define STACK_ALIGN(90,2929 -#define STORE_RETURN_VALUE(247,8387 -#define STORE_STRUCT_RETURN(234,7864 +#define ABOUT_TO_RETURN(108,3543 +#define EXTRACT_RETURN_VALUE(243,8214 +#define EXTRACT_STRUCT_VALUE_ADDRESS(256,8805 +#define FIX_CALL_DUMMY(668,25292 +#define FRAMELESS_FUNCTION_INVOCATION(330,11399 +#define FRAME_ARGS_ADDRESS(338,11655 +#define FRAME_CHAIN(317,10906 +#define FRAME_CHAIN_COMBINE(323,11107 +#define FRAME_CHAIN_VALID(320,10990 +#define FRAME_FIND_SAVED_REGS(372,13037 +#define FRAME_LOCALS_ADDRESS(342,11754 +#define FRAME_NUM_ARGS(349,12012 +#define FRAME_SAVED_PC(335,11544 +#define FRAME_STRUCT_ARGS_ADDRESS(340,11701 +#define GET_RWINDOW_REG(276,9300 +#define INIT_EXTRA_FRAME_INFO(310,10692 +#define INVALID_FLOAT(113,3698 +#define PC_ADJUST(78,2670 +#define REGISTER_BYTE(172,6081 +#define REGISTER_CONVERTIBLE(212,7216 +#define REGISTER_CONVERT_TO_RAW(223,7535 +#define REGISTER_CONVERT_TO_VIRTUAL(217,7352 +#define REGISTER_IN_WINDOW_P(184,6542 +#define REGISTER_RAW_SIZE(192,6752 +#define REGISTER_VIRTUAL_SIZE(199,6916 +#define REGISTER_VIRTUAL_TYPE(229,7705 +#define SAVED_PC_AFTER_CALL(81,2773 +#define SKIP_PROLOGUE(66,2226 +#define STACK_ALIGN(92,3028 +#define STORE_RETURN_VALUE(249,8486 +#define STORE_STRUCT_RETURN(236,7963 m-sun2.h,1033 #define ABOUT_TO_RETURN(87,2526 @@ -1880,35 +1906,38 @@ m-umax.h,953 #define STORE_STRUCT_RETURN(250,7722 #define vprintf(401,13167 -m-vax.h,1031 -#define ABOUT_TO_RETURN(124,4067 -#define EXTRACT_RETURN_VALUE(230,7586 -#define EXTRACT_STRUCT_VALUE_ADDRESS(243,8093 -#define FIX_CALL_DUMMY(390,14084 -#define FRAMELESS_FUNCTION_INVOCATION(282,9558 -#define FRAME_ARGS_ADDRESS(291,9902 -#define FRAME_CHAIN(266,8961 -#define FRAME_CHAIN_COMBINE(274,9220 -#define FRAME_CHAIN_VALID(271,9103 -#define FRAME_FIND_SAVED_REGS(314,10763 -#define FRAME_LOCALS_ADDRESS(296,10079 -#define FRAME_NUM_ARGS(301,10218 -#define FRAME_SAVED_PC(286,9650 -#define INIT_STACK(413,14868 -#define INVALID_FLOAT(129,4255 -#define REGISTER_BYTE(178,6064 -#define REGISTER_CONVERTIBLE(201,6677 -#define REGISTER_CONVERT_TO_RAW(212,6992 -#define REGISTER_CONVERT_TO_VIRTUAL(206,6811 -#define REGISTER_RAW_SIZE(183,6226 -#define REGISTER_U_ADDR(163,5488 -#define REGISTER_VIRTUAL_SIZE(188,6379 -#define REGISTER_VIRTUAL_TYPE(218,7160 +m-vax.h,1140 +#define ABOUT_TO_RETURN(136,4647 +#define EXTRACT_RETURN_VALUE(242,8166 +#define EXTRACT_STRUCT_VALUE_ADDRESS(255,8673 +#define FIX_CALL_DUMMY(416,15467 +#define FRAMELESS_FUNCTION_INVOCATION(294,10138 +#define FRAME_ARGS_ADDRESS(317,11265 +#define FRAME_ARGS_ADDRESS_CORRECT(309,10917 +#define FRAME_CHAIN(278,9541 +#define FRAME_CHAIN_COMBINE(286,9800 +#define FRAME_CHAIN_VALID(283,9683 +#define FRAME_FIND_SAVED_REGS(340,12146 +#define FRAME_LOCALS_ADDRESS(322,11462 +#define FRAME_NUM_ARGS(327,11601 +#define FRAME_SAVED_PC(298,10230 +#define INIT_STACK(439,16251 +#define INVALID_FLOAT(141,4835 +#define IN_SIGTRAMP(111,4009 +#define REGISTER_BYTE(190,6644 +#define REGISTER_CONVERTIBLE(213,7257 +#define REGISTER_CONVERT_TO_RAW(224,7572 +#define REGISTER_CONVERT_TO_VIRTUAL(218,7391 +#define REGISTER_RAW_SIZE(195,6806 +#define REGISTER_U_ADDR(175,6068 +#define REGISTER_VIRTUAL_SIZE(200,6959 +#define REGISTER_VIRTUAL_TYPE(230,7740 #define SAVED_PC_AFTER_CALL(97,3393 #define SKIP_PROLOGUE(71,2233 -#define STORE_RETURN_VALUE(236,7790 -#define STORE_STRUCT_RETURN(223,7347 -#define vprintf(247,8229 +#define STORE_RETURN_VALUE(248,8370 +#define STORE_STRUCT_RETURN(235,7927 +#define my_offsetof(105,3692 +#define vprintf(259,8809 m-symmetry.h,1043 #define ABOUT_TO_RETURN(100,3009 @@ -1940,40 +1969,41 @@ m-symmetry.h,1043 #define STORE_STRUCT_RETURN(340,10541 #define vprintf(366,11512 -m-convex.h,1213 -#define ABOUT_TO_RETURN(161,5350 -#define EXTRACT_RETURN_VALUE(289,9422 -#define EXTRACT_STRUCT_VALUE_ADDRESS(304,10016 -#define FIX_CALL_DUMMY(558,20262 -#define FRAMELESS_FUNCTION_INVOCATION(377,12561 -#define FRAME_ARGS_ADDRESS(387,12923 -#define FRAME_CHAIN(362,11985 -#define FRAME_CHAIN_COMBINE(367,12172 -#define FRAME_CHAIN_VALID(364,12055 -#define FRAME_FIND_SAVED_REGS(416,14210 -#define FRAME_LOCALS_ADDRESS(389,12999 -#define FRAME_NUM_ARGS(394,13136 -#define FRAME_SAVED_PC(385,12856 -#define IGNORE_SYMBOL(60,1833 -#define INVALID_FLOAT(166,5500 -#define READ_FILE_HEADERS(579,20967 -#define READ_STRING_TABLE_SIZE(571,20792 -#define REGISTER_BYTE(234,7698 -#define REGISTER_CONVERTIBLE(259,8404 -#define REGISTER_CONVERT_TO_RAW(270,8745 -#define REGISTER_CONVERT_TO_VIRTUAL(264,8538 -#define REGISTER_RAW_SIZE(241,7944 -#define REGISTER_VIRTUAL_SIZE(246,8087 -#define REGISTER_VIRTUAL_TYPE(276,8938 -#define SAVED_PC_AFTER_CALL(119,3872 -#define SKIP_PROLOGUE(95,2894 -#define STAB_REG_TO_REGNUM(213,7014 -#define STORE_RETURN_VALUE(297,9704 -#define STORE_STRUCT_RETURN(282,9175 -#define is_arith_pc(134,4501 -#define is_break_pc(135,4575 -#define is_trace_pc(133,4427 -#define vprintf(309,10198 +m-convex.h,1245 +#define ABOUT_TO_RETURN(169,5578 +#define EXTRACT_RETURN_VALUE(297,9649 +#define EXTRACT_STRUCT_VALUE_ADDRESS(312,10243 +#define FIX_CALL_DUMMY(566,20487 +#define FRAMELESS_FUNCTION_INVOCATION(385,12786 +#define FRAME_ARGS_ADDRESS(395,13148 +#define FRAME_CHAIN(370,12212 +#define FRAME_CHAIN_COMBINE(375,12399 +#define FRAME_CHAIN_VALID(372,12282 +#define FRAME_FIND_SAVED_REGS(424,14435 +#define FRAME_LOCALS_ADDRESS(397,13224 +#define FRAME_NUM_ARGS(402,13361 +#define FRAME_SAVED_PC(393,13081 +#define IGNORE_SYMBOL(61,1855 +#define IGNORE_SYMBOL(66,2028 +#define INVALID_FLOAT(174,5728 +#define READ_FILE_HEADERS(587,21192 +#define READ_STRING_TABLE_SIZE(579,21017 +#define REGISTER_BYTE(242,7925 +#define REGISTER_CONVERTIBLE(267,8631 +#define REGISTER_CONVERT_TO_RAW(278,8972 +#define REGISTER_CONVERT_TO_VIRTUAL(272,8765 +#define REGISTER_RAW_SIZE(249,8171 +#define REGISTER_VIRTUAL_SIZE(254,8314 +#define REGISTER_VIRTUAL_TYPE(284,9165 +#define SAVED_PC_AFTER_CALL(127,4104 +#define SKIP_PROLOGUE(103,3126 +#define STAB_REG_TO_REGNUM(221,7242 +#define STORE_RETURN_VALUE(305,9931 +#define STORE_STRUCT_RETURN(290,9402 +#define is_arith_pc(142,4731 +#define is_break_pc(143,4805 +#define is_trace_pc(141,4657 +#define vprintf(317,10425 obstack.h,1102 #define __INT_TO_PTR(121,5178 diff --git a/gdb/blockframe.c b/gdb/blockframe.c index 3ea5919..2817017 100644 --- a/gdb/blockframe.c +++ b/gdb/blockframe.c @@ -431,7 +431,15 @@ find_pc_function (pc) /* Finds the "function" (text symbol) that is smaller than PC but greatest of all of the potential text symbols. Sets *NAME and/or *ADDRESS conditionally if that pointer is non-zero. - Returns 0 if it couldn't find anything, 1 if it did. */ + Returns 0 if it couldn't find anything, 1 if it did. + + Note that there are several possible responses: + * Set *NAME and *ADDRESS to nonzero values and return 0 + * Set *NAME and *ADDRESS to zero and return 0 + * Don't set *NAME and *ADDRESS and return 1 + (I don't know whether it *should* work this way, but I'd rather + document it than risk breaking code + which depends on this behavior). */ int find_pc_partial_function (pc, name, address) diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 60115c4..e4bb5a1 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -1297,6 +1297,7 @@ A disabled breakpoint is not forgotten, but has no effect until reenabled.\n\ The \"display\" subcommand applies to auto-displays instead of breakpoints.", &disablelist, "disable ", 1, &cmdlist); add_com_alias ("dis", "disable", class_breakpoint, 1); + add_com_alias ("disa", "disable", class_breakpoint, 1); add_abbrev_cmd ("breakpoints", class_breakpoint, disable_command, "Disable some breakpoints or auto-display expressions.\n\ diff --git a/gdb/coffread.c b/gdb/coffread.c index 46a47a1..f6a9c8a 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -747,9 +747,7 @@ symbol_file_command (name) if (num_symbols == 0) { free_all_symtabs (); - printf ("%s does not have a symbol-table.\n", name); - fflush (stdout); - return; + error ("%s does not have a symbol-table.\n", name); } printf ("Reading symbol data from %s...", name); @@ -814,7 +812,7 @@ symbol_file_command (name) /* Make a default for file to list. */ - select_source_symtab (symtab_list); + select_source_symtab (0); symfile = savestring (name, strlen (name)); diff --git a/gdb/config.gdb b/gdb/config.gdb index b7ef693..f94eee6 100755 --- a/gdb/config.gdb +++ b/gdb/config.gdb @@ -51,35 +51,40 @@ news) sun2) case $os in os4|sunos4) - $machine=sun2os4 - $os="" + machine=sun2os4 + os="" ;; os2|sunos2) - $machine=sun2os2 - $os="" + machine=sun2os2 + os="" ;; esac ;; sun3) case $os in os4|sunos4) - $machine=sun3os4 - $os="" + machine=sun3os4 + os="" ;; os3|sunos3) - $machine=sun3os3 - $os="" + machine=sun3os3 + os="" ;; esac ;; sparc|sun4) case $os in os4|sunos4) - $machine=sun4os4 - $os="" + machine=sun4os4 + os="" ;; esac ;; +# GCC accepts sequent-i386 or symmetry, so be consistent. +sequent-i386) + machine=symmetry + os="" + ;; esac paramfile=m-${machine}${os}.h @@ -117,7 +122,10 @@ altosgas) ;; vax) echo - echo "/bin/cc has been known to fail on readline.c on VAXen running BSD4.3" +# The following types of /bin/cc failures have been observed: +# 1. Something in readline.c which I have never seen +# 2. ``"values.c", line 816: compiler error: schain botch'' + echo "/bin/cc has been known to fail on VAXen running BSD4.3" echo "If this occurs, use gcc " echo " (but see comments in Makefile.dist about compiling with gcc)." echo @@ -166,13 +174,17 @@ i386gas) # of this file about unneeded files. opcodefile=m-i386.h ;; -i386-sysv3.2) +# These names are short and cryptic due to the @#$#!@#$@! System V +# 14 character file name limit. +i386-sv32) makedefine="-DM_CLIBS=-lPW -DM_SYSV -DM_REGEX=regex.o" pinsnfile=i386-pinsn.c depfile=i386-dep.c - opcodefile=/dev/null +# The following is a lie, but a necessary one. See comment at beginning +# of this file about unneeded files. + opcodefile=m-i386.h ;; -i386gas-sysv3.2) +i386g-sv32) makedefine="-DM_CLIBS=-lPW -DM_SYSV -DM_REGEX=regex.o" echo echo "Use of the coff encapsulation features requires the GNU binary utilities" @@ -180,7 +192,9 @@ i386gas-sysv3.2) echo pinsnfile=i386-pinsn.c depfile=i386-dep.c - opcodefile=/dev/null +# The following is a lie, but a necessary one. See comment at beginning +# of this file about unneeded files. + opcodefile=m-i386.h ;; merlin) pinsnfile=ns32k-pinsn.c @@ -256,9 +270,12 @@ sun4os4|sun4-os4) depfile=sparc-dep.c ;; symmetry) + paramfile=m-symmetry.h + depfile=symmetry-dep.c pinsnfile=i386-pinsn.c -# Need *some* opcode file to keep make from trying to make opcode.h - opcodefile=/dev/null +# The following is a lie, but a necessary one. See comment at beginning +# of this file about unneeded files. + opcodefile=m-i386.h ;; umax) pinsnfile=ns32k-pinsn.c @@ -107,19 +107,19 @@ CORE_ADDR text_end; CORE_ADDR exec_data_start; CORE_ADDR exec_data_end; -/* Address in executable file of start of text area data. */ +/* Offset within executable file of start of text area data. */ int text_offset; -/* Address in executable file of start of data area data. */ +/* Offset within executable file of start of data area data. */ int exec_data_offset; -/* Address in core file of start of data area data. */ +/* Offset within core file of start of data area data. */ int data_offset; -/* Address in core file of start of stack area data. */ +/* Offset within core file of start of stack area data. */ int stack_offset; diff --git a/gdb/dbxread.c b/gdb/dbxread.c index cbb4e0c..9c9f2bf 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -1936,6 +1936,8 @@ read_dbx_symtab (desc, stringtab, stringtab_size, nlistlen, inclink, profile_types[i] = 0; #endif + stringtab_global = stringtab; + pst = (struct partial_symtab *) 0; includes_allocated = 30; @@ -2270,9 +2272,7 @@ read_dbx_symtab (desc, stringtab, stringtab_size, nlistlen, inclink, p = (char *) index (namestring, ':'); - /* Skip if there is no : or if the thing following the : is - not a letter (which indicates declaration of a local - variable, which we aren't interested in). */ + /* Skip if there is no :. */ if (!p) continue; switch (p[1]) @@ -2281,11 +2281,75 @@ read_dbx_symtab (desc, stringtab, stringtab_size, nlistlen, inclink, ADD_PSYMBOL_TO_LIST (namestring, p - namestring, STRUCT_NAMESPACE, LOC_TYPEDEF, static_psymbols, bufp->n_value); - continue; + goto check_enum; case 't': ADD_PSYMBOL_TO_LIST (namestring, p - namestring, VAR_NAMESPACE, LOC_TYPEDEF, static_psymbols, bufp->n_value); + check_enum: + /* If this is an enumerated type, we need to + add all the enum constants to the partial symbol + table. This does not cover enums without names, e.g. + "enum {a, b} c;" in C, but fortunately those are + rare. There is no way for GDB to find those from the + enum type without spending too much time on it. Thus + to solve this problem, the compiler needs to put out separate + constant symbols ('c' N_LSYMS) for enum constants in + enums without names. */ + + /* We are looking for something of the form + <name> ":" ("t" | "T") [<number> "="] "e" + {<constant> ":" <value> ","} ";". */ + + /* Skip over the colon and the 't' or 'T'. */ + p += 2; + /* This type may be given a number. Skip over it. */ + while ((*p >= '0' && *p <= '9') + || *p == '=') + p++; + + if (*p++ == 'e') + { + /* We have found an enumerated type. */ + /* According to comments in read_enum_type + a comma could end it instead of a semicolon. + I don't know where that happens. + Accept either. */ + while (*p && *p != ';' && *p != ',') + { + char *q; + + /* Check for and handle cretinous dbx symbol name + continuation! */ + if (*p == '\\') + p = next_symbol_text (); + + /* Point to the character after the name + of the enum constant. */ + for (q = p; *q && *q != ':'; q++) + ; + /* Note that the value doesn't matter for + enum constants in psymtabs, just in symtabs. */ + ADD_PSYMBOL_TO_LIST (p, q - p, + VAR_NAMESPACE, LOC_CONST, + static_psymbols, 0); + /* Point past the name. */ + p = q; + /* Skip over the value. */ + while (*p && *p != ',') + p++; + /* Advance past the comma. */ + if (*p) + p++; + } + } + + continue; + case 'c': + /* Constant, e.g. from "const" in Pascal. */ + ADD_PSYMBOL_TO_LIST (namestring, p - namestring, + VAR_NAMESPACE, LOC_CONST, + static_psymbols, bufp->n_value); continue; default: #ifdef PROFILE_TYPES @@ -2293,10 +2357,18 @@ read_dbx_symtab (desc, stringtab, stringtab_size, nlistlen, inclink, printf ("Funny...LSYM with a letter that isn't a type\n"); autovars++; #endif + /* Skip if the thing following the : is + not a letter (which indicates declaration of a local + variable, which we aren't interested in). */ continue; } case N_FUN: +#if 0 + /* This special-casing of N_FUN is just wrong; N_FUN + does not mean "function"; it means "text segment". + So N_FUN can go with 'V', etc. as well as 'f' or 'F'. */ + SET_NAMESTRING(); p = (char *) index (namestring, ':'); @@ -2314,7 +2386,7 @@ read_dbx_symtab (desc, stringtab, stringtab_size, nlistlen, inclink, static_psymbols, bufp->n_value); continue; - +#endif /* 0 */ case N_GSYM: /* Global (extern) variable; can be data or bss (sigh). */ case N_STSYM: /* Data seg var -- static */ @@ -2369,17 +2441,36 @@ read_dbx_symtab (desc, stringtab, stringtab_size, nlistlen, inclink, global_psymbols, bufp->n_value); continue; - /* I don't think the default case should happen. A breakpoint - here to check would probably be good. */ - default: + case 'f': + ADD_PSYMBOL_TO_LIST (namestring, p - namestring, + VAR_NAMESPACE, LOC_BLOCK, + static_psymbols, bufp->n_value); + continue; + /* Two things show up here (hopefully); static symbols of local scope (static used inside braces) or extensions of structure symbols. We can ignore both. */ - if (p[1] != 'V' && p[1] != '(' - && (p[1] < '0' || p[1] > '9')) - fatal ("Internal error: Unexpected debugging symbol type '%c' at symnum %d.\n", - p[1], symnum); + case 'V': + case '(': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + /* Global functions are ignored here. I'm not + sure what psymtab they go into (or just the misc + function vector). */ + case 'F': continue; + + default: + fatal ("Internal error: Unexpected debugging symbol type '%c' at symnum %d.\n", + p[1], symnum); } #ifdef N_BINCL @@ -3657,6 +3748,32 @@ add_file_command (arg_string) fflush (stdout); } +/* Read a number by which a type is referred to in dbx data, + or perhaps read a pair (FILENUM, TYPENUM) in parentheses. + Just a single number N is equivalent to (0,N). + Return the two numbers by storing them in the vector TYPENUMS. + TYPENUMS will then be used as an argument to dbx_lookup_type. */ + +static void +read_type_number (pp, typenums) + register char **pp; + register int *typenums; +{ + if (**pp == '(') + { + (*pp)++; + typenums[0] = read_number (pp, ','); + typenums[1] = read_number (pp, ')'); + } + else + { + typenums[0] = 0; + typenums[1] = read_number (pp, 0); + } +} + + + static struct symbol * define_symbol (value, string, desc) int value; @@ -3696,7 +3813,10 @@ define_symbol (value, string, desc) /* c is a special case, not followed by a type-number. SYMBOL:c=iVALUE for an integer constant symbol. - SYMBOL:c=rVALUE for a floating constant symbol. */ + SYMBOL:c=rVALUE for a floating constant symbol. + SYMBOL:c=eTYPE,INTVALUE for an enum constant symbol. + e.g. "b:c=e6,0" for "const b = blob1" + (where type 6 is defined by "blobs:t6=eblob1:0,blob2:1,;"). */ if (deftype == 'c') { if (*p++ != '=') @@ -3722,6 +3842,22 @@ define_symbol (value, string, desc) SYMBOL_CLASS (sym) = LOC_CONST; } break; + case 'e': + /* SYMBOL:c=eTYPE,INTVALUE for an enum constant symbol. + e.g. "b:c=e6,0" for "const b = blob1" + (where type 6 is defined by "blobs:t6=eblob1:0,blob2:1,;"). */ + { + int typenums[2]; + + read_type_number (&p, typenums); + if (*p++ != ',') + error ("Invalid symbol data: no comma in enum const symbol"); + + SYMBOL_TYPE (sym) = *dbx_lookup_type (typenums); + SYMBOL_VALUE (sym) = atoi (p); + SYMBOL_CLASS (sym) = LOC_CONST; + } + break; default: error ("Invalid symbol data at symtab pos %d.", symnum); } @@ -3796,9 +3932,40 @@ define_symbol (value, string, desc) SYMBOL_VALUE (sym) = value; SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE; add_symbol_to_list (sym, &local_symbols); + /* If it's compiled, if it says `short', believe it. */ if (processing_gcc_compilation || BELIEVE_PCC_PROMOTION) break; + +#if defined(BELIEVE_PCC_PROMOTION_TYPE) + /* This macro is defined on machines (e.g. sparc) where + we should believe the type of a PCC 'short' argument, + but shouldn't believe the address (the address is + the address of the corresponding int). Note that + this is only different from the BELIEVE_PCC_PROMOTION + case on big-endian machines. + + My guess is that this correction, as opposed to changing + the parameter to an 'int' (as done below, for PCC + on most machines), is the right thing to do + on all machines, but I don't want to risk breaking + something that already works. On most PCC machines, + the sparc problem doesn't come up because the calling + function has to zero the top bytes (not knowing whether + the called function wants an int or a short), so there + is no practical difference between an int and a short + (except perhaps what happens when the GDB user types + "print short_arg = 0x10000;"). */ + if (SYMBOL_TYPE (sym) == builtin_type_char + || SYMBOL_TYPE (sym) == builtin_type_unsigned_char) + SYMBOL_VALUE (sym) += 3; + if (SYMBOL_TYPE (sym) == builtin_type_short + || SYMBOL_TYPE (sym) == builtin_type_unsigned_short) + SYMBOL_VALUE (sym) += 2; + break; + +#else /* no BELIEVE_PCC_PROMOTION_TYPE. */ + /* If PCC says a parameter is a short or a char, it is really an int. */ if (SYMBOL_TYPE (sym) == builtin_type_char @@ -3809,6 +3976,8 @@ define_symbol (value, string, desc) SYMBOL_TYPE (sym) = builtin_type_unsigned_int; break; +#endif /* no BELIEVE_PCC_PROMOTION_TYPE. */ + case 'P': SYMBOL_CLASS (sym) = LOC_REGPARM; SYMBOL_VALUE (sym) = STAB_REG_TO_REGNUM (value); @@ -3960,30 +4129,6 @@ cleanup_undefined_types () -/* Read a number by which a type is referred to in dbx data, - or perhaps read a pair (FILENUM, TYPENUM) in parentheses. - Just a single number N is equivalent to (0,N). - Return the two numbers by storing them in the vector TYPENUMS. - TYPENUMS will then be used as an argument to dbx_lookup_type. */ - -static void -read_type_number (pp, typenums) - register char **pp; - register int *typenums; -{ - if (**pp == '(') - { - (*pp)++; - typenums[0] = read_number (pp, ','); - typenums[1] = read_number (pp, ')'); - } - else - { - typenums[0] = 0; - typenums[1] = read_number (pp, 0); - } -} - /* Read a dbx type reference or definition; return the type that is meant. This can be just a number, in which case it references @@ -4508,6 +4653,16 @@ read_struct_type (pp, type) list->field.bitpos = read_number (pp, ','); list->field.bitsize = read_number (pp, ';'); +#if 0 + /* This is wrong because this is identical to the symbols + produced for GCC 0-size arrays. For example: + typedef union { + int num; + char str[0]; + } foo; + The code which dumped core in such circumstances should be + fixed not to dump core. */ + /* g++ -g0 can put out bitpos & bitsize zero for a static field. This does not give us any way of getting its class, so we can't know its name. But we can just @@ -4536,6 +4691,7 @@ Therefore GDB will not know about your class variables.\n\ list = list->next; } else +#endif /* 0 */ { /* Detect an unpacked field and mark it as such. dbx gives a bit size for all fields. diff --git a/gdb/default-dep.c b/gdb/default-dep.c index a859418..b38c205 100644 --- a/gdb/default-dep.c +++ b/gdb/default-dep.c @@ -189,16 +189,16 @@ read_inferior_memory (memaddr, myaddr, len) { errno = 0; #if 0 -This is now done by read_memory, because when this function did it, - reading a byte or short int hardware port read whole longs, causing - serious side effects - such as bus errors and unexpected hardware operation. This would - also be a problem with ptrace if the inferior process could read - or write hardware registers, but that's not usually the case. + /* This is now done by read_memory, because when this function did it, + reading a byte or short int hardware port read whole longs, causing + serious side effects + such as bus errors and unexpected hardware operation. This would + also be a problem with ptrace if the inferior process could read + or write hardware registers, but that's not usually the case. */ if (remote_debugging) buffer[i] = remote_fetch_word (addr); -#endif else +#endif buffer[i] = ptrace (1, inferior_pid, addr, 0); if (errno) return errno; @@ -413,6 +413,11 @@ core_file_command (filename, from_tty) perror_with_name ("Not a core file: reading upage"); if (val != sizeof u) error ("Not a core file: could only read %d bytes", val); + + /* We are depending on exec_file_command having been called + previously to set exec_data_start. Since the executable + and the core file share the same text segment, the address + of the data segment will be the same in both. */ data_start = exec_data_start; data_end = data_start + NBPG * u.u_dsize; @@ -739,7 +739,7 @@ evaluate_subexp (expect_type, exp, pos, noside) lval_memory); else if (TYPE_CODE (VALUE_TYPE (arg1)) == TYPE_CODE_INT) /* GDB allows dereferencing an int. */ - return value_zero (BUILTIN_TYPE_LONGEST, lval_memory); + return value_zero (builtin_type_int, lval_memory); else error ("Attempt to take contents of a non-pointer value."); } diff --git a/gdb/frame.h b/gdb/frame.h index 5f0a664..322ddba 100644 --- a/gdb/frame.h +++ b/gdb/frame.h @@ -111,3 +111,5 @@ extern struct symbol *get_pc_function (); /* In stack.c */ extern FRAME find_relative_frame (); +/* Generic pointer value indicating "I don't know." */ +#define Frame_unknown (CORE_ADDR)-1 diff --git a/gdb/gdb.texinfo b/gdb/gdb.texinfo index 8e98d8b..6d6f21d 100644 --- a/gdb/gdb.texinfo +++ b/gdb/gdb.texinfo @@ -40,9 +40,9 @@ original English. @sp 1 @center The GNU Source-Level Debugger @sp 4 -@center Third Edition, GDB version 3.2 +@center Third Edition, GDB version 3.4 @sp 1 -@center April 1989 +@center October 1989 @sp 5 @center Richard M. Stallman @page @@ -669,6 +669,9 @@ correct, but there's no sense in pushing your luck. GDB no longer supports the debugging information produced by giving the GNU C compiler the @samp{-gg} option, so do not use this option. +@ignore +@comment As far as I know, there are no cases in which GDB will +@comment produce strange output in this case. (but no promises). If your program includes archives made with the @code{ar} program, and if the object files used as input to @code{ar} were compiled without the @samp{-g} option and have names longer than 15 characters, GDB will get @@ -680,6 +683,7 @@ names longer than 15 characters. To avoid this problem, compile the archive members with the @samp{-g} option or use shorter file names. Alternatively, use a version of GNU @code{ar} dated more recently than August 1989. +@end ignore @node Running, Stopping, Compilation, Top @chapter Running Your Program Under GDB @@ -3341,13 +3345,19 @@ to correspond properly to the code. @node Remote, Commands, Emacs, Top @chapter Remote Kernel Debugging -GDB has a special facility for debugging a remote machine via a serial -connection. This can be used for kernel debugging. +If you are trying to debug a program running on a machine that can't run +GDB in the usual way, it is often useful to use remote debugging. For +example, you might be debugging an operating system kernel, or debugging +a small system which does not have a general purpose operating system +powerful enough to run a full-featured debugger. Currently GDB supports +remote debugging over a serial connection. The program to be debugged on the remote machine needs to contain a debugging device driver which talks to GDB over the serial line using the protocol described below. The same version of GDB that is used ordinarily -can be used for this. +can be used for this. Several sample remote debugging drivers are +distributed with GDB; see the @file{README} file in the GDB distribution for +more information. @menu * Remote Commands:: Commands used to start and finish remote debugging. diff --git a/gdb/hp300bsd-dep.c b/gdb/hp300bsd-dep.c index d04977c..71fdb95 100644 --- a/gdb/hp300bsd-dep.c +++ b/gdb/hp300bsd-dep.c @@ -1,6 +1,21 @@ -In other words, go ahead and share GDB, but don't try to stop -anyone else from sharing it farther. Help stamp out software hoarding! -*/ +/* Machine-dependent code for a Hewlett-Packard 9000/300, running bsd. + Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc. + +This file is part of GDB. + +GDB is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 1, or (at your option) +any later version. + +GDB is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GDB; see the file COPYING. If not, write to +the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "defs.h" #include "param.h" diff --git a/gdb/i386-dep.c b/gdb/i386-dep.c index 09e7e0d..f3ae993 100644 --- a/gdb/i386-dep.c +++ b/gdb/i386-dep.c @@ -767,6 +767,65 @@ i386_get_frame_setup (pc) return (-1); } +/* Return number of args passed to a frame. + Can return -1, meaning no way to tell. */ + +/* on the 386, the instruction following the call could be: + * popl %ecx - one arg + * addl $imm, %esp - imm/4 args; imm may be 8 or 32 bits + * anything else - zero args + */ + +int +i386_frame_num_args (fi) + struct frame_info fi; +{ + int retpc; + unsigned char op; + struct frame_info *pfi; + + pfi = get_prev_frame_info ((fi)); + if (pfi == 0) + { + /* Note: this can happen if we are looking at the frame for + main, because FRAME_CHAIN_VALID won't let us go into + start. If we have debugging symbols, that's not really + a big deal; it just means it will only show as many arguments + to main as are declared. */ + return -1; + } + else + { + retpc = pfi->pc; + op = read_memory_integer (retpc, 1); + if (op == 0x59) + /* pop %ecx */ + return 1; + else if (op == 0x83) + { + op = read_memory_integer (retpc+1, 1); + if (op == 0xc4) + /* addl $<signed imm 8 bits>, %esp */ + return (read_memory_integer (retpc+2,1)&0xff)/4; + else + return 0; + } + else if (op == 0x81) + { /* add with 32 bit immediate */ + op = read_memory_integer (retpc+1, 1); + if (op == 0xc4) + /* addl $<imm 32>, %esp */ + return read_memory_integer (retpc+2, 4) / 4; + else + return 0; + } + else + { + return 0; + } + } +} + /* * parse the first few instructions of the function to see * what registers were stored. diff --git a/gdb/inflow.c b/gdb/inflow.c index c72b754..3a1bdf2 100644 --- a/gdb/inflow.c +++ b/gdb/inflow.c @@ -470,6 +470,11 @@ inferior_died () set_current_frame (0); } +#if 0 +/* This function is just for testing, and on some systems (Sony NewsOS + 3.2) <sys/user.h> also includes <sys/time.h> which leads to errors + (since on this system at least sys/time.h is not protected against + multiple inclusion). */ static void try_writing_regs_command () { @@ -480,7 +485,12 @@ try_writing_regs_command () if (inferior_pid == 0) error ("There is no inferior process now."); - for (i = 0; ; i += 2) + /* A Sun 3/50 or 3/60 (at least) running SunOS 4.0.3 will have a + kernel panic if we try to write past the end of the user area. + Presumably Sun will fix this bug (it has been reported), but it + is tacky to crash the system, so at least on SunOS4 we need to + stop writing when we hit the end of the user area. */ + for (i = 0; i < sizeof (struct user); i += 2) { QUIT; errno = 0; @@ -495,6 +505,7 @@ try_writing_regs_command () printf (" Failed at 0x%x.\n", i); } } +#endif void _initialize_inflow () @@ -502,9 +513,11 @@ _initialize_inflow () add_com ("term-status", class_obscure, term_status_command, "Print info on inferior's saved terminal status."); +#if 0 add_com ("try-writing-regs", class_obscure, try_writing_regs_command, "Try writing all locations in inferior's system block.\n\ Report which ones can be written."); +#endif add_com ("kill", class_run, kill_command, "Kill execution of program being debugged."); diff --git a/gdb/infrun.c b/gdb/infrun.c index 66b964c..5dcf564 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -139,9 +139,34 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <sys/ptrace.h> #endif /* UMAX_PTRACE */ +/* Required by <sys/user.h>. */ +#include <sys/types.h> +/* Required by <sys/user.h>, at least on system V. */ +#include <sys/dir.h> +/* Needed by IN_SIGTRAMP on some machines (e.g. vax). */ +#include <sys/param.h> +/* Needed by IN_SIGTRAMP on some machines (e.g. vax). */ +#include <sys/user.h> + extern char *sys_siglist[]; extern int errno; +/* Sigtramp is a routine that the kernel calls (which then calls the + signal handler). On most machines it is a library routine that + is linked into the executable. + + This macro, given a program counter value and the name of the + function in which that PC resides (which can be null if the + name is not known), returns nonzero if the PC and name show + that we are in sigtramp. + + On most machines just see if the name is sigtramp (and if we have + no name, assume we are not in sigtramp). */ +#if !defined (IN_SIGTRAMP) +#define IN_SIGTRAMP(pc, name) \ + name && !strcmp ("_sigtramp", name) +#endif + /* Tables of how to react to signals; the user sets them. */ static char signal_stop[NSIG]; @@ -534,8 +559,9 @@ wait_for_inferior () stop_frame_address = FRAME_FP (get_current_frame ()); stop_sp = read_register (SP_REGNUM); stop_func_start = 0; - /* Don't care about return value; stop_func_start will be 0 - if it doesn't work. */ + stop_func_name = 0; + /* Don't care about return value; stop_func_start and stop_func_name + will both be 0 if it doesn't work. */ (void) find_pc_partial_function (stop_pc, &stop_func_name, &stop_func_start); stop_func_start += FUNCTION_START_OFFSET; @@ -813,8 +839,8 @@ wait_for_inferior () } /* Did we just take a signal? */ - if (stop_func_name && !strcmp ("_sigtramp", stop_func_name) - && (!prev_func_name || strcmp ("_sigtramp", prev_func_name))) + if (IN_SIGTRAMP (stop_pc, stop_func_name) + && !IN_SIGTRAMP (prev_pc, prev_func_name)) { /* We've just taken a signal; go until we are back to the point where we took it and one more. */ diff --git a/gdb/isi-dep.c b/gdb/isi-dep.c new file mode 100644 index 0000000..bbeae10 --- /dev/null +++ b/gdb/isi-dep.c @@ -0,0 +1,624 @@ +/* Low level interface to ptrace, for GDB when running under Unix. + Copyright (C) 1988 Free Software Foundation, Inc. + +GDB is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY. No author or distributor accepts responsibility to anyone +for the consequences of using it or for whether it serves any +particular purpose or works at all, unless he says so in writing. +Refer to the GDB General Public License for full details. + +Everyone is granted permission to copy, modify and redistribute GDB, +but only under the conditions described in the GDB General Public +License. A copy of this license is supposed to have been given to you +along with GDB so you can know your rights and responsibilities. It +should be in a file named COPYING. Among other things, the copyright +notice and this notice must be preserved on all copies. + +In other words, go ahead and share GDB, but don't try to stop +anyone else from sharing it farther. Help stamp out software hoarding! +*/ + +#include "defs.h" +#include "param.h" +#include "frame.h" +#include "inferior.h" + +#ifdef USG +#include <sys/types.h> +#endif + +#include <stdio.h> +#include <sys/param.h> +#include <sys/dir.h> +#include <signal.h> +#include <sys/user.h> +#include <sys/ioctl.h> +#include <fcntl.h> + +#ifdef COFF_ENCAPSULATE +#include "a.out.encap.h" +#else +#include <a.out.h> +#endif +#ifndef N_SET_MAGIC +#define N_SET_MAGIC(exec, val) ((exec).a_magic = (val)) +#endif +#include <sys/file.h> +#include <sys/stat.h> + +#include <sys/ptrace.h> +#ifdef ATTACH_DETACH +static int oldParent; +extern int attach_flag; +#endif /* ATTACH_DETACH */ + +/* + * Mapping of register numbers to their position in the stack + */ +#include <machine/reg.h> +int rloc[] = { + R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, FP, SP, PS, PC +}; + +extern int errno; + +/* This function simply calls ptrace with the given arguments. + It exists so that all calls to ptrace are isolated in this + machine-dependent file. */ +int +call_ptrace (request, pid, arg3, arg4) + int request, pid, arg3, arg4; +{ + return ptrace (request, pid, arg3, arg4); +} + +#ifdef ATTACH_DETACH +/* Start debugging the process whose number is PID. */ + +attach (pid) + int pid; +{ + errno = 0; + oldParent = ptrace (PT_ATTACH, pid, 0, 0); + if (errno) + perror_with_name ("ptrace"); + attach_flag = 1; + return pid; +} + +/* Stop debugging the process whose number is PID + and continue it with signal number SIGNAL. + SIGNAL = 0 means just continue it. */ + +void +detach (signal) + int signal; +{ + errno = 0; + ptrace (PT_DETACH, inferior_pid, signal, oldParent); + if (errno) + perror_with_name ("ptrace"); + attach_flag = 0; +} + +#endif /* ATTACH_DETACH */ + +kill_inferior () +{ + if (remote_debugging) + return; + if (inferior_pid == 0) + return; + +#ifdef ATTACH_DETACH + if (attach_flag) { + /* + * Need to detach so the old parent gets notified of the death. + */ + detach(SIGKILL); + } else { +#endif /* ATTACH_DETACH */ + ptrace (PT_KILL, inferior_pid, 0, 0); + wait (0); +#ifdef ATTACH_DETACH + } +#endif /* ATTACH_DETACH */ + inferior_died (); +} + +/* This is used when GDB is exiting. It gives less chance of error.*/ + +kill_inferior_fast () +{ + if (remote_debugging) + return; + if (inferior_pid == 0) + return; +#ifdef ATTACH_DETACH + if (attach_flag) { + detach(SIGKILL); + } else { +#endif /* ATTACH_DETACH */ + ptrace (PT_KILL, inferior_pid, 0, 0); + wait (0); +#ifdef ATTACH_DETACH + } +#endif /* ATTACH_DETACH */ +} + +/* Resume execution of the inferior process. + If STEP is nonzero, single-step it. + If SIGNAL is nonzero, give it that signal. */ + +void +resume (step, signal) + int step; + int signal; +{ + errno = 0; + if (remote_debugging) + remote_resume (step, signal); + else + { + ptrace (step ? PT_STEP : PT_CONTINUE, inferior_pid, 1, signal); + if (errno) + perror_with_name ("ptrace"); + } +} + +void +fetch_inferior_registers () +{ + register int regno; + register unsigned int regaddr; + char buf[MAX_REGISTER_RAW_SIZE]; + register int i; + + struct user u; + unsigned int offset = (char *) &u.u_ar0 - (char *) &u; + offset = ptrace (3, inferior_pid, offset, 0) - KERNEL_U_ADDR; + + for (regno = 0; regno < NUM_REGS; regno++) + { + regaddr = register_addr (regno, offset); + for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int)) + { + *(int *) &buf[i] = ptrace (3, inferior_pid, regaddr, 0); + regaddr += sizeof (int); + } + supply_register (regno, buf); + } +} + +/* Store our register values back into the inferior. + If REGNO is -1, do this for all registers. + Otherwise, REGNO specifies which register (so we can save time). */ + +store_inferior_registers (regno) + int regno; +{ + register unsigned int regaddr; + char buf[80]; + + struct user u; + unsigned int offset = (char *) &u.u_ar0 - (char *) &u; + offset = ptrace (3, inferior_pid, offset, 0) - KERNEL_U_ADDR; + + if (regno >= 0) + { + regaddr = register_addr (regno, offset); + errno = 0; + ptrace (6, inferior_pid, regaddr, read_register (regno)); + if (errno != 0) + { + sprintf (buf, "writing register number %d", regno); + perror_with_name (buf); + } + } + else for (regno = 0; regno < NUM_REGS; regno++) + { + regaddr = register_addr (regno, offset); + errno = 0; + ptrace (6, inferior_pid, regaddr, read_register (regno)); + if (errno != 0) + { + sprintf (buf, "writing register number %d", regno); + perror_with_name (buf); + } + } +} + +/* Copy LEN bytes from inferior's memory starting at MEMADDR + to debugger memory starting at MYADDR. + On failure (cannot read from inferior, usually because address is out + of bounds) returns the value of errno. */ + +int +read_inferior_memory (memaddr, myaddr, len) + CORE_ADDR memaddr; + char *myaddr; + int len; +{ + register int i; + /* Round starting address down to longword boundary. */ + register CORE_ADDR addr = memaddr & - sizeof (int); + /* Round ending address up; get number of longwords that makes. */ + register int count + = (((memaddr + len) - addr) + sizeof (int) - 1) / sizeof (int); + /* Allocate buffer of that many longwords. */ + register int *buffer = (int *) alloca (count * sizeof (int)); + extern int errno; + + /* Read all the longwords */ + for (i = 0; i < count; i++, addr += sizeof (int)) + { + errno = 0; + if (remote_debugging) + buffer[i] = remote_fetch_word (addr); + else + buffer[i] = ptrace (1, inferior_pid, addr, 0); + if (errno) + return errno; + } + + /* Copy appropriate bytes out of the buffer. */ + bcopy ((char *) buffer + (memaddr & (sizeof (int) - 1)), myaddr, len); + return 0; +} + +/* Copy LEN bytes of data from debugger memory at MYADDR + to inferior's memory at MEMADDR. + On failure (cannot write the inferior) + returns the value of errno. */ + +int +write_inferior_memory (memaddr, myaddr, len) + CORE_ADDR memaddr; + char *myaddr; + int len; +{ + register int i; + /* Round starting address down to longword boundary. */ + register CORE_ADDR addr = memaddr & - sizeof (int); + /* Round ending address up; get number of longwords that makes. */ + register int count + = (((memaddr + len) - addr) + sizeof (int) - 1) / sizeof (int); + /* Allocate buffer of that many longwords. */ + register int *buffer = (int *) alloca (count * sizeof (int)); + extern int errno; + + /* Fill start and end extra bytes of buffer with existing memory data. */ + + if (remote_debugging) + buffer[0] = remote_fetch_word (addr); + else + buffer[0] = ptrace (1, inferior_pid, addr, 0); + + if (count > 1) + { + if (remote_debugging) + buffer[count - 1] + = remote_fetch_word (addr + (count - 1) * sizeof (int)); + else + buffer[count - 1] + = ptrace (1, inferior_pid, + addr + (count - 1) * sizeof (int), 0); + } + + /* Copy data to be written over corresponding part of buffer */ + + bcopy (myaddr, (char *) buffer + (memaddr & (sizeof (int) - 1)), len); + + /* Write the entire buffer. */ + + for (i = 0; i < count; i++, addr += sizeof (int)) + { + errno = 0; + if (remote_debugging) + remote_store_word (addr, buffer[i]); + else + ptrace (4, inferior_pid, addr, buffer[i]); + if (errno) + return errno; + } + + return 0; +} + +/* Work with core dump and executable files, for GDB. + This code would be in core.c if it weren't machine-dependent. */ + +/* Recognize COFF format systems because a.out.h defines AOUTHDR. */ +#ifdef AOUTHDR +#define COFF_FORMAT +#endif + +#ifndef N_TXTADDR +#define N_TXTADDR(hdr) 0 +#endif /* no N_TXTADDR */ + +#ifndef N_DATADDR +#define N_DATADDR(hdr) hdr.a_text +#endif /* no N_DATADDR */ + +/* Make COFF and non-COFF names for things a little more compatible + to reduce conditionals later. */ + +#ifdef COFF_FORMAT +#define a_magic magic +#endif + +#ifndef COFF_FORMAT +#define AOUTHDR struct exec +#endif + +extern char *sys_siglist[]; + + +/* Hook for `exec_file_command' command to call. */ + +extern void (*exec_file_display_hook) (); + +/* File names of core file and executable file. */ + +extern char *corefile; +extern char *execfile; + +/* Descriptors on which core file and executable file are open. + Note that the execchan is closed when an inferior is created + and reopened if the inferior dies or is killed. */ + +extern int corechan; +extern int execchan; + +/* Last modification time of executable file. + Also used in source.c to compare against mtime of a source file. */ + +extern int exec_mtime; + +/* Virtual addresses of bounds of the two areas of memory in the core file. */ + +extern CORE_ADDR data_start; +extern CORE_ADDR data_end; +extern CORE_ADDR stack_start; +extern CORE_ADDR stack_end; + +/* Virtual addresses of bounds of two areas of memory in the exec file. + Note that the data area in the exec file is used only when there is no core file. */ + +extern CORE_ADDR text_start; +extern CORE_ADDR text_end; + +extern CORE_ADDR exec_data_start; +extern CORE_ADDR exec_data_end; + +/* Address in executable file of start of text area data. */ + +extern int text_offset; + +/* Address in executable file of start of data area data. */ + +extern int exec_data_offset; + +/* Address in core file of start of data area data. */ + +extern int data_offset; + +/* Address in core file of start of stack area data. */ + +extern int stack_offset; + +#ifdef COFF_FORMAT +/* various coff data structures */ + +extern FILHDR file_hdr; +extern SCNHDR text_hdr; +extern SCNHDR data_hdr; + +#endif /* not COFF_FORMAT */ + +/* a.out header saved in core file. */ + +extern AOUTHDR core_aouthdr; + +/* a.out header of exec file. */ + +extern AOUTHDR exec_aouthdr; + +extern void validate_files (); + +core_file_command (filename, from_tty) + char *filename; + int from_tty; +{ + int val; + extern char registers[]; + + /* Discard all vestiges of any previous core file + and mark data and stack spaces as empty. */ + + if (corefile) + free (corefile); + corefile = 0; + + if (corechan >= 0) + close (corechan); + corechan = -1; + + data_start = 0; + data_end = 0; + stack_start = STACK_END_ADDR; + stack_end = STACK_END_ADDR; + + /* Now, if a new core file was specified, open it and digest it. */ + + if (filename) + { + filename = tilde_expand (filename); + make_cleanup (free, filename); + + if (have_inferior_p ()) + error ("To look at a core file, you must kill the inferior with \"kill\"."); + corechan = open (filename, O_RDONLY, 0); + if (corechan < 0) + perror_with_name (filename); + /* 4.2-style (and perhaps also sysV-style) core dump file. */ + { + struct user u; + + int reg_offset; + + val = myread (corechan, &u, sizeof u); + if (val < 0) + perror_with_name (filename); + data_start = exec_data_start; + + data_end = data_start + NBPG * u.u_dsize; + stack_start = stack_end - NBPG * u.u_ssize; + data_offset = NBPG * UPAGES; + stack_offset = NBPG * (UPAGES + u.u_dsize); + reg_offset = (int) u.u_ar0 - KERNEL_U_ADDR; + + /* I don't know where to find this info. + So, for now, mark it as not available. */ + N_SET_MAGIC (core_aouthdr, 0); + + /* Read the register values out of the core file and store + them where `read_register' will find them. */ + + { + register int regno; + + for (regno = 0; regno < NUM_REGS; regno++) + { + char buf[MAX_REGISTER_RAW_SIZE]; + + val = lseek (corechan, register_addr (regno, reg_offset), 0); + if (val < 0) + perror_with_name (filename); + + val = myread (corechan, buf, sizeof buf); + if (val < 0) + perror_with_name (filename); + supply_register (regno, buf); + } + } + } + if (filename[0] == '/') + corefile = savestring (filename, strlen (filename)); + else + { + corefile = concat (current_directory, "/", filename); + } + + set_current_frame ( create_new_frame (read_register (FP_REGNUM), + read_pc ())); + select_frame (get_current_frame (), 0); + validate_files (); + } + else if (from_tty) + printf ("No core file now.\n"); +} + +exec_file_command (filename, from_tty) + char *filename; + int from_tty; +{ + int val; + + /* Eliminate all traces of old exec file. + Mark text segment as empty. */ + + if (execfile) + free (execfile); + execfile = 0; + data_start = 0; + data_end -= exec_data_start; + text_start = 0; + text_end = 0; + exec_data_start = 0; + exec_data_end = 0; + if (execchan >= 0) + close (execchan); + execchan = -1; + + /* Now open and digest the file the user requested, if any. */ + + if (filename) + { + filename = tilde_expand (filename); + make_cleanup (free, filename); + + execchan = openp (getenv ("PATH"), 1, filename, O_RDONLY, 0, + &execfile); + if (execchan < 0) + perror_with_name (filename); + +#ifdef COFF_FORMAT + { + int aout_hdrsize; + int num_sections; + + if (read_file_hdr (execchan, &file_hdr) < 0) + error ("\"%s\": not in executable format.", execfile); + + aout_hdrsize = file_hdr.f_opthdr; + num_sections = file_hdr.f_nscns; + + if (read_aout_hdr (execchan, &exec_aouthdr, aout_hdrsize) < 0) + error ("\"%s\": can't read optional aouthdr", execfile); + + if (read_section_hdr (execchan, _TEXT, &text_hdr, num_sections) < 0) + error ("\"%s\": can't read text section header", execfile); + + if (read_section_hdr (execchan, _DATA, &data_hdr, num_sections) < 0) + error ("\"%s\": can't read data section header", execfile); + + text_start = exec_aouthdr.text_start; + text_end = text_start + exec_aouthdr.tsize; + text_offset = text_hdr.s_scnptr; + exec_data_start = exec_aouthdr.data_start; + exec_data_end = exec_data_start + exec_aouthdr.dsize; + exec_data_offset = data_hdr.s_scnptr; + data_start = exec_data_start; + data_end += exec_data_start; + exec_mtime = file_hdr.f_timdat; + } +#else /* not COFF_FORMAT */ + { + struct stat st_exec; + +#ifdef HEADER_SEEK_FD + HEADER_SEEK_FD (execchan); +#endif + + val = myread (execchan, &exec_aouthdr, sizeof (AOUTHDR)); + + if (val < 0) + perror_with_name (filename); + + text_start = N_TXTADDR (exec_aouthdr); + exec_data_start = N_DATADDR (exec_aouthdr); + + text_offset = N_TXTOFF (exec_aouthdr); + exec_data_offset = N_TXTOFF (exec_aouthdr) + exec_aouthdr.a_text; + + text_end = text_start + exec_aouthdr.a_text; + exec_data_end = exec_data_start + exec_aouthdr.a_data; + data_start = exec_data_start; + data_end += exec_data_start; + + fstat (execchan, &st_exec); + exec_mtime = st_exec.st_mtime; + } +#endif /* not COFF_FORMAT */ + + validate_files (); + } + else if (from_tty) + printf ("No exec file now.\n"); + + /* Tell display code (if any) about the changed file name. */ + if (exec_file_display_hook) + (*exec_file_display_hook) (filename); +} diff --git a/gdb/m-convex.h b/gdb/m-convex.h index 7d162d4..d391175 100644 --- a/gdb/m-convex.h +++ b/gdb/m-convex.h @@ -57,8 +57,16 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Symbol types to ignore. */ +#if defined (N_MONPT) #define IGNORE_SYMBOL(TYPE) \ - (((TYPE) & ~N_EXT) == N_TBSS || ((TYPE) & ~N_EXT) == N_TDATA) + (((TYPE) & ~N_EXT) == N_TBSS \ + || ((TYPE) & ~N_EXT) == N_TDATA \ + || ((TYPE) & ~N_EXT) == N_MONPT) +#else /* no N_MONPT */ +#define IGNORE_SYMBOL(TYPE) \ + (((TYPE) & ~N_EXT) == N_TBSS \ + || ((TYPE) & ~N_EXT) == N_TDATA) +#endif /* no N_MONPT */ /* Use SIGCONT rather than SIGTSTP because convex Unix occasionally turkeys SIGTSTP. I think. */ @@ -119,7 +127,7 @@ extern unsigned text_end; #define SAVED_PC_AFTER_CALL(frame) \ read_memory_integer (read_register (SP_REGNUM), 4) -/* Address of end of stack space. +/* Address of end of stack space. This is ((USRSTACK + 0xfff) & -0x1000)) from <convex/vmparam.h> but that expression depends on the kernel version; instead, fetch a page-zero pointer and get it from that. This will be invalid if @@ -149,7 +157,7 @@ extern unsigned text_end; #define BREAKPOINT {0x7d,0x50} /* Amount PC must be decremented by after a breakpoint. - This is often the number of bytes in BREAKPOINT but not always. + This is often the number of bytes in BREAKPOINT but not always. (The break PC needs to be decremented by 2, but we do it when the break frame is recognized and popped. That way gdb can tell breaks from trace traps with certainty.) */ @@ -228,7 +236,7 @@ extern unsigned text_end; #define REGISTER_BYTES (4*10 + 8*8) /* Index within `registers' of the first byte of the space for - register N. + register N. NB: must match structure of struct syscall_context for correct operation */ #define REGISTER_BYTE(N) ((N) < s7_REGNUM ? 4*(N) : \ @@ -370,7 +378,7 @@ extern struct value *value_of_trapped_internalvar (); /* A macro that tells us whether the function invocation represented by FI does not have a frame on the stack associated with it. If it - does not, FRAMELESS is set to 1, else 0. + does not, FRAMELESS is set to 1, else 0. On convex, check at the return address for `callq' -- if so, frameless, otherwise, not. */ diff --git a/gdb/m-i386-sysv3.2.h b/gdb/m-i386-sv32.h index 38fb4eb..38fb4eb 100644 --- a/gdb/m-i386-sysv3.2.h +++ b/gdb/m-i386-sv32.h diff --git a/gdb/m-i386.h b/gdb/m-i386.h index 68df868..ff62a25 100644 --- a/gdb/m-i386.h +++ b/gdb/m-i386.h @@ -287,34 +287,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Return number of args passed to a frame. Can return -1, meaning no way to tell. */ -/* on the 386, the instruction following the call could be: - * popl %ecx - one arg - * addl $imm, %esp - imm/4 args; imm may be 8 or 32 bits - * anything else - zero args - */ -#define FRAME_NUM_ARGS(numargs, fi) { \ - int retpc; \ - unsigned char op; \ - struct frame_info *pfi; \ - pfi = get_prev_frame_info ((fi)); \ - retpc = pfi->pc; \ - numargs = 0; \ - op = read_memory_integer (retpc, 1); \ - if (op == 0x59) \ - /* pop %ecx */ \ - (numargs) = 1; \ - else if (op == 0x83) { \ - op = read_memory_integer (retpc+1, 1); \ - if (op == 0xc4) \ - /* addl $<signed imm 8 bits>, %esp */ \ - (numargs) = (read_memory_integer (retpc+2,1)&0xff)/4;\ - } else if (op == 0x81) { /* add with 32 bit immediate */\ - op = read_memory_integer (retpc+1, 1); \ - if (op == 0xc4) \ - /* addl $<imm 32>, %esp */ \ - (numargs) = read_memory_integer (retpc+2, 4) / 4;\ - } \ -} +#define FRAME_NUM_ARGS(numargs, fi) (numargs) = i386_frame_num_args(fi) /* Return number of bytes at start of arglist that are not really args. */ diff --git a/gdb/m-i386gas-sysv3.2.h b/gdb/m-i386g-sv32.h index 3d69eea..3d69eea 100644 --- a/gdb/m-i386gas-sysv3.2.h +++ b/gdb/m-i386g-sv32.h diff --git a/gdb/m-sparc.h b/gdb/m-sparc.h index 7615611..eb190f5 100644 --- a/gdb/m-sparc.h +++ b/gdb/m-sparc.h @@ -52,6 +52,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ argument is in the upper half of the word reserved on the stack, but puts it in the lower half. */ /* #define BELIEVE_PCC_PROMOTION 1 */ +/* OK, I've added code to dbxread.c to deal with this case. */ +#define BELIEVE_PCC_PROMOTION_TYPE /* Offset from address of function to start of its code. Zero on most machines. */ diff --git a/gdb/m-vax.h b/gdb/m-vax.h index 906ed03..9f0c414 100644 --- a/gdb/m-vax.h +++ b/gdb/m-vax.h @@ -101,6 +101,18 @@ fix to bug-gdb@prep.ai.mit.edu. */ #define KERNEL_U_ADDR (0x80000000 - (UPAGES * NBPG)) +/* Same as offsetof macro from stddef.h (which 4.3BSD doesn't have). */ +#define my_offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER) + +/* On the VAX, sigtramp is in the u area. Note that this definition + includes both the subroutine at u_pcb.pcb_sigc[3], and the + routine at u_pcb.pcb_sigc[0] (which does a calls to u_pcb.pcb_sigc[3]). + I think this is what we want. */ +#define IN_SIGTRAMP(pc, name) \ + ((pc) >= KERNEL_U_ADDR + my_offsetof (struct user, u_pcb.pcb_sigc[0]) \ + && (pc) < KERNEL_U_ADDR + my_offsetof (struct user, u_pcb.pcb_sigc[5]) \ + ) + /* Address of end of stack space. */ #define STACK_END_ADDR (0x80000000 - (UPAGES * NBPG)) @@ -285,13 +297,27 @@ fix to bug-gdb@prep.ai.mit.edu. */ #define FRAME_SAVED_PC(FRAME) (read_memory_integer ((FRAME)->frame + 16, 4)) -/* Cannot find the AP register value directly from the FP value. - Must find it saved in the frame called by this one, or in the AP register - for the innermost frame. */ +/* Cannot find the AP register value directly from the FP value. Must + find it saved in the frame called by this one, or in the AP + register for the innermost frame. However, there is no way to tell + the difference between the innermost frame and a frame for which we + just don't know the frame that it called (e.g. "info frame + 0x7ffec789"). For the sake of argument suppose that the stack is + somewhat trashed (which is one reason that "info frame" exists). + So return Frame_unknown (indicating we don't know the address of + the arglist) if we don't know what frame this frame calls. */ +#define FRAME_ARGS_ADDRESS_CORRECT(fi) \ + (((fi)->next_frame \ + ? read_memory_integer ((fi)->next_frame + 8, 4) \ + : /* read_register (AP_REGNUM) */ Frame_unknown)) + +/* In most of GDB, getting the args address is too important to + just say "I don't know". This is sometimes wrong, but c'est + la vie. */ #define FRAME_ARGS_ADDRESS(fi) \ (((fi)->next_frame \ ? read_memory_integer ((fi)->next_frame + 8, 4) \ - : read_register (AP_REGNUM))) + : read_register (AP_REGNUM) /* Frame_unknown */)) #define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame) diff --git a/gdb/m68k-pinsn.c b/gdb/m68k-pinsn.c index 6a67431..22fa5d7 100644 --- a/gdb/m68k-pinsn.c +++ b/gdb/m68k-pinsn.c @@ -773,6 +773,10 @@ print_base (regno, disp, stream) fprintf_filtered (stream, "%d(%s)", disp, reg_names[regno]); } +/* Nonzero if the host system has a 68881 (or compatible) + floating-point unit. This does *not* indicate whether the target + system has a co-processor, just whether the host system does. + There might be a difference in the case of remote debugging. */ static int have_fpu = 1; /* This is not part of insn printing, but it is machine-specific, @@ -347,6 +347,36 @@ main (argc, argv, envp) /* -t /def/ttyp1: use /dev/ttyp1 for inferior I/O. */ else if (!strcmp (arg, "-t") || !strcmp (arg, "-tty")) tty_command (argv[i], 0); + + /* -help: print a summary of command line switches. */ + else if (!strcmp (arg, "-help")) + { + fputs ("\ +This is GDB, the GNU debugger. Use the command\n\ + gdb [options] [executable [core-file]]\n\ +to enter the debugger.\n\ +\n\ +Options available are:\n\ + -help Print this message.\n\ + -quiet Do not print version number on startup.\n\ + -fullname Output information used by emacs-GDB interface.\n\ + -batch Exit after processing options.\n\ + -nx Do not read .gdbinit file.\n\ + -tty TTY Use TTY for input/output by the program being debugged.\n\ + -cd DIR Change current directory to DIR.\n\ + -directory DIR Search for source files in DIR.\n\ + -command FILE Execute GDB commands from FILE.\n\ + -symbols SYMFILE Read symbols from SYMFILE.\n\ + -exec EXECFILE Use EXECFILE as the executable.\n\ + -se FILE Use FILE as symbol file and executable file.\n\ + -core COREFILE Analyze the core dump COREFILE.\n\ +\n\ +For more information, type \"help\" from within GDB, or consult the\n\ +GDB manual (available as on-line info or a printed manual).\n", stderr); + /* Exiting after printing this message seems like + the most useful thing to do. */ + exit (0); + } else error ("Unknown command-line switch: \"%s\"\n", arg); } diff --git a/gdb/printcmd.c b/gdb/printcmd.c index 6a6cd34..269ec4b 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -708,8 +708,10 @@ x_command (exp, from_tty) *exp = 0; old_chain = make_cleanup (free_current_contents, &expr); val = evaluate_expression (expr); - if (last_format == 'i' - && TYPE_CODE (VALUE_TYPE (val)) != TYPE_CODE_PTR + /* In rvalue contexts, such as this, functions are coerced into + pointers to functions. This makes "x/i main" work. */ + if (/* last_format == 'i' + && */ TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_FUNC && VALUE_LVAL (val) == lval_memory) next_address = VALUE_ADDRESS (val); else diff --git a/gdb/readline/ChangeLog b/gdb/readline/ChangeLog index 6df2335..58a5784 100644 --- a/gdb/readline/ChangeLog +++ b/gdb/readline/ChangeLog @@ -1,3 +1,18 @@ +Thu Oct 19 17:18:40 1989 Jim Kingdon (kingdon at hobbes.ai.mit.edu) + + * Move vi_doing_insert from vi_mode.c to readline.c + + * readline.c: Move compare_strings before its use. + Remove definitions. + + * readline.c: Move defining_kbd_macro above rl_dispatch. + (rl_dispatch): Remove "extern int defining_kbd_macro". + +Mon Oct 16 11:56:03 1989 Jim Kingdon (kingdon at hobbes.ai.mit.edu) + + * readline.c (rl_set_signals): Remove unnecessary "static int + rl_signal_handler()". + Sat Sep 30 14:51:56 1989 Jim Kingdon (kingdon at hobbes.ai.mit.edu) * readline.c (rl_initialize): Change parsing_conditionalized_out diff --git a/gdb/readline/Makefile b/gdb/readline/Makefile index dc11539..fadca97 100644 --- a/gdb/readline/Makefile +++ b/gdb/readline/Makefile @@ -65,7 +65,7 @@ all: libreadline.a libreadline.a: readline.o history.o funmap.o keymaps.o $(RM) -f libreadline.a $(AR) clq libreadline.a readline.o history.o funmap.o keymaps.o - if [ -f $(RANLIB) ]; then $(RANLIB) libreadline.a; fi +# if [ -f $(RANLIB) ]; then $(RANLIB) libreadline.a; fi readline.o: readline.h chardefs.h keymaps.h history.h readline.c vi_mode.c $(CC) -c $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \ @@ -111,4 +111,4 @@ clean: $(DESTDIR)/libreadline.a: libreadline.a -mv $(DESTDIR)/libreadline.a $(DESTDIR)/libreadline.old cp libreadline.a $(DESTDIR)/libreadline.a - $(RANLIB) -t $(DESTDIR)/libreadline.a +# $(RANLIB) -t $(DESTDIR)/libreadline.a diff --git a/gdb/readline/funmap.c b/gdb/readline/funmap.c index 9783abf..357e716 100644 --- a/gdb/readline/funmap.c +++ b/gdb/readline/funmap.c @@ -34,6 +34,11 @@ static char *xmalloc (), *xrealloc (); FUNMAP **funmap = (FUNMAP **)NULL; static int funmap_size = 0; + +static int just_testing_ar_tmp = 0; +static int just_testing_ar_tmp_2 = 5; +int foo_testing_ar; + static int funmap_entry = 0; static FUNMAP default_funmap[] = { diff --git a/gdb/readline/readline.c b/gdb/readline/readline.c index a9ed39e..0185e13 100644 --- a/gdb/readline/readline.c +++ b/gdb/readline/readline.c @@ -139,6 +139,14 @@ static SigHandler *old_sigwinch = (SigHandler *)NULL; #endif #endif +/* Stupid comparison routine for qsort () ing strings. */ +static int +compare_strings (s1, s2) + char **s1, **s2; +{ + return (strcmp (*s1, *s2)); +} + /* **************************************************************** */ /* */ @@ -391,6 +399,40 @@ readline_internal () } +/* Variables for keyboard macros. */ + +/* The currently executing macro string. If this is non-zero, + then it is a malloc ()'ed string where input is coming from. */ +static char *executing_macro = (char *)NULL; + +/* The offset in the above string to the next character to be read. */ +static int executing_macro_index = 0; + +/* Non-zero means to save keys that we dispatch on in a kbd macro. */ +static int defining_kbd_macro = 0; + +/* The current macro string being built. Characters get stuffed + in here by add_macro_char (). */ +static char *current_macro = (char *)NULL; + +/* The size of the buffer allocated to current_macro. */ +static int current_macro_size = 0; + +/* The index at which characters are being added to current_macro. */ +static int current_macro_index = 0; + +/* A structure used to save nested macro strings. + It is a linked list of string/index for each saved macro. */ +struct saved_macro { + struct saved_macro *next; + char *string; + int index; +}; + +/* The list of saved macros. */ +struct saved_macro *macro_list = (struct saved_macro *)NULL; + + /* **************************************************************** */ /* */ /* Signal Handling */ @@ -472,9 +514,8 @@ rl_signal_handler (sig, code, scp) rl_set_signals () { - static int rl_signal_handler (); - old_int = (SigHandler *)signal (SIGINT, rl_signal_handler); + if (old_int == (SigHandler *)SIG_IGN) signal (SIGINT, SIG_IGN); @@ -685,10 +726,12 @@ rl_dispatch (key, map) register int key; Keymap map; { - static int defining_kbd_macro; - if (defining_kbd_macro) - add_macro_char (key); + { + static add_macro_char (); + + add_macro_char (key); + } if (key > 127 && key < 256) { @@ -769,43 +812,14 @@ rl_dispatch (key, map) /* */ /* **************************************************************** */ -/* The currently executing macro string. If this is non-zero, - then it is a malloc ()'ed string where input is coming from. */ -static char *executing_macro = (char *)NULL; - -/* The offset in the above string to the next character to be read. */ -static int executing_macro_index = 0; - -/* Non-zero means to save keys that we dispatch on in a kbd macro. */ -static int defining_kbd_macro = 0; - -/* The current macro string being built. Characters get stuffed - in here by add_macro_char (). */ -static char *current_macro = (char *)NULL; - -/* The size of the buffer allocated to current_macro. */ -static int current_macro_size = 0; - -/* The index at which characters are being added to current_macro. */ -static int current_macro_index = 0; - -/* A structure used to save nested macro strings. - It is a linked list of string/index for each saved macro. */ -struct saved_macro { - struct saved_macro *next; - char *string; - int index; -}; - -/* The list of saved macros. */ -struct saved_macro *macro_list = (struct saved_macro *)NULL; - /* Set up to read subsequent input from STRING. STRING is free ()'ed when we are done with it. */ static with_macro_input (string) char *string; { + static push_executing_macro (); + push_executing_macro (); executing_macro = string; executing_macro_index = 0; @@ -821,6 +835,8 @@ next_macro_key () if (!executing_macro[executing_macro_index]) { + static pop_executing_macro (); + pop_executing_macro (); return (next_macro_key ()); } @@ -934,6 +950,10 @@ rl_call_last_kbd_macro (count, ignore) } +/* Non-zero means do not parse any lines other than comments and + parser directives. */ +static unsigned char parsing_conditionalized_out = 0; + /* **************************************************************** */ /* */ /* Initializations */ @@ -980,7 +1000,6 @@ rl_initialize () /* Parsing of key-bindings begins in an enabled state. */ { - static unsigned char parsing_conditionalized_out; parsing_conditionalized_out = 0; } } @@ -2571,6 +2590,11 @@ rl_tab_insert (count) rl_insert (count, '\t'); } +#ifdef VI_MODE +/* Non-zero means enter insertion mode. */ +static vi_doing_insert = 0; +#endif + /* What to do when a NEWLINE is pressed. We accept the whole line. KEY is the key that invoked this command. I guess it could have meaning in the future. */ @@ -2582,7 +2606,6 @@ rl_newline (count, key) #ifdef VI_MODE { - static int vi_doing_insert; if (vi_doing_insert) { rl_end_undo_group (); @@ -3097,7 +3120,7 @@ rl_complete_internal (what_to_do) if (rl_ignore_completion_duplicates) { char *lowest_common; - int compare_strings (), j, newlen = 0; + int j, newlen = 0; /* Sort the items. */ /* It is safe to sort this array, because the lowest common @@ -3308,7 +3331,6 @@ rl_complete_internal (what_to_do) /* Sort the items if they are not already sorted. */ if (!rl_ignore_completion_duplicates) { - int compare_strings (); qsort (matches, len, sizeof (char *), compare_strings); } @@ -3362,14 +3384,6 @@ rl_complete_internal (what_to_do) } } -/* Stupid comparison routine for qsort () ing strings. */ -static int -compare_strings (s1, s2) - char **s1, **s2; -{ - return (strcmp (*s1, *s2)); -} - /* A completion function for usernames. TEXT contains a partial username preceded by a random character (usually `~'). */ @@ -4910,6 +4924,7 @@ rl_named_function (string) char *string; { register int i; + static int stricmp (); for (i = 0; funmap[i]; i++) if (stricmp (funmap[i]->name, string) == 0) @@ -5006,10 +5021,6 @@ function_exit: /* Calling programs set this to have their argv[0]. */ char *rl_readline_name = "other"; -/* Non-zero means do not parse any lines other than comments and - parser directives. */ -static unsigned char parsing_conditionalized_out = 0; - /* Stack of previous values of parsing_conditionalized_out. */ static unsigned char *if_stack = (unsigned char *)NULL; static int if_stack_depth = 0; @@ -5020,6 +5031,7 @@ parser_if (args) char *args; { register int i; + static int stricmp (); /* Push parser state. */ if (if_stack_depth + 1 >= if_stack_size) @@ -5090,6 +5102,7 @@ handle_parser_directive (statement) { register int i; char *directive, *args; + static int stricmp (); /* Isolate the actual directive. */ @@ -5128,7 +5141,7 @@ rl_parse_and_bind (string) { extern char *possible_control_prefixes[], *possible_meta_prefixes[]; char *rindex (), *funname, *kname; - static int substring_member_of_array (); + static int substring_member_of_array (), stricmp (); register int c; int key, i; @@ -5280,7 +5293,7 @@ rl_parse_and_bind (string) rl_variable_bind (name, value) char *name, *value; { - static int strnicmp (); + static int strnicmp (), stricmp (); if (stricmp (name, "editing-mode") == 0) { @@ -5335,6 +5348,7 @@ glean_key_from_name (name) char *name; { register int i; + static int stricmp (); for (i = 0; name_key_alist[i].name; i++) if (stricmp (name, name_key_alist[i].name) == 0) diff --git a/gdb/readline/vi_mode.c b/gdb/readline/vi_mode.c index 0900e89..f750b41 100644 --- a/gdb/readline/vi_mode.c +++ b/gdb/readline/vi_mode.c @@ -13,9 +13,6 @@ static char *vi_last_search = (char *)NULL; static int vi_histpos; -/* Non-zero means enter insertion mode. */ -static vi_doing_insert = 0; - /* *** UNCLEAN *** */ /* Command keys which do movement for xxx_to commands. */ static char *vi_motion = " hl^$0ftFt;,%wbeWBE|"; diff --git a/gdb/stack.c b/gdb/stack.c index 981348a..3762f7d 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -301,6 +301,16 @@ parse_frame_specification (frame_exp) /* NOTREACHED */ } +/* FRAME_ARGS_ADDRESS_CORRECT is just like FRAME_ARGS_ADDRESS except + that if it is unsure about the answer, it returns Frame_unknown + instead of guessing (this happens on the VAX, for example). + + On most machines, we never have to guess about the args address, + so FRAME_ARGS_ADDRESS{,_CORRECT} are the same. */ +#if !defined (FRAME_ARGS_ADDRESS_CORRECT) +#define FRAME_ARGS_ADDRESS_CORRECT FRAME_ARGS_ADDRESS +#endif + /* Print verbosely the selected frame or the frame at address ADDR. This means absolutely all information in the frame is printed. */ @@ -316,7 +326,6 @@ frame_info (addr_exp) FRAME calling_frame; int i, count; char *funname = 0; - int numargs; if (!(have_inferior_p () || have_core_file_p ())) error ("No inferior or core file."); @@ -359,20 +368,31 @@ frame_info (addr_exp) printf (" caller of frame at 0x%x", fi->next_frame); if (fi->next_frame || calling_frame) printf ("\n"); - printf (" Arglist at 0x%x,", FRAME_ARGS_ADDRESS (fi)); - FRAME_NUM_ARGS (i, fi); - if (i < 0) - printf (" args: "); - else if (i == 0) - printf (" no args."); - else if (i == 1) - printf (" 1 arg: "); - else - printf (" %d args: ", i); - FRAME_NUM_ARGS (numargs, fi); - print_frame_args (func, fi, numargs, stdout); - printf ("\n"); + { + /* Address of the argument list for this frame, or Frame_unknown. */ + CORE_ADDR arg_list = FRAME_ARGS_ADDRESS_CORRECT (fi); + /* Number of args for this frame, or -1 if unknown. */ + int numargs; + + if (arg_list != Frame_unknown) + { + printf (" Arglist at 0x%x,", arg_list); + + FRAME_NUM_ARGS (numargs, fi); + if (numargs < 0) + printf (" args: "); + else if (numargs == 0) + printf (" no args."); + else if (numargs == 1) + printf (" 1 arg: "); + else + printf (" %d args: ", numargs); + print_frame_args (func, fi, numargs, stdout); + printf ("\n"); + } + } + /* The sp is special; what's returned isn't the save address, but actually the value of the previous frame's sp. */ printf (" Previous frame's sp is 0x%x\n", fsr.regs[SP_REGNUM]); diff --git a/gdb/symtab.c b/gdb/symtab.c index a8108d8..2b4dfb7 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -1567,7 +1567,13 @@ decode_line_1 (argptr, funfirstline, default_symtab, default_line) that depends on knowing the name of D. */ if (class_name) { - while (*class_name++ != ' '); + /* We just want the class name. In the context + of C++, stripping off "struct " is always + sensible. */ + if (strncmp("struct ", class_name, 7) == 0) + class_name += 7; + if (strncmp("union ", class_name, 6) == 0) + class_name += 6; sym_class = lookup_symbol (class_name, 0, STRUCT_NAMESPACE, 0); for (method_counter = TYPE_NFN_FIELDS (SYMBOL_TYPE (sym_class)) - 1; diff --git a/gdb/utils.c b/gdb/utils.c index 8eb3c68..18e0fe8 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -287,7 +287,9 @@ fatal_dump_core (string, arg) char *string; int arg; { - fprintf (stderr, "gdb: "); + /* "internal error" is always correct, since GDB should never dump + core, no matter what the input. */ + fprintf (stderr, "gdb internal error: "); fprintf (stderr, string, arg); fprintf (stderr, "\n"); signal (SIGQUIT, SIG_DFL); @@ -698,7 +700,7 @@ fprintf_filtered (stream, format, arg1, arg2, arg3, arg4, arg5, arg6) /* This won't blow up if the restrictions described above are followed. */ - (void) sprintf (linebuffer, format, arg1, arg2, arg3); + (void) sprintf (linebuffer, format, arg1, arg2, arg3, arg4, arg5, arg6); fputs_filtered (linebuffer, stream); } diff --git a/gdb/valops.c b/gdb/valops.c index c70219f..2e7354b 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -392,9 +392,12 @@ value_ind (arg1) if (TYPE_CODE (VALUE_TYPE (arg1)) == TYPE_CODE_MEMBER) error ("not implemented: member types in value_ind"); - /* Allow * on an integer so we can cast it to whatever we want. */ + /* Allow * on an integer so we can cast it to whatever we want. + This returns an int, which seems like the most C-like thing + to do. "long long" variables are rare enough that + BUILTIN_TYPE_LONGEST would seem to be a mistake. */ if (TYPE_CODE (VALUE_TYPE (arg1)) == TYPE_CODE_INT) - return value_at (BUILTIN_TYPE_LONGEST, + return value_at (builtin_type_int, (CORE_ADDR) value_as_long (arg1)); else if (TYPE_CODE (VALUE_TYPE (arg1)) == TYPE_CODE_PTR) return value_at (TYPE_TARGET_TYPE (VALUE_TYPE (arg1)), diff --git a/gdb/version.c b/gdb/version.c index 0136f8f..d141464 100644 --- a/gdb/version.c +++ b/gdb/version.c @@ -17,4 +17,4 @@ You should have received a copy of the GNU General Public License along with GDB; see the file COPYING. If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ -char *version = "3.3"; +char *version = "3.4"; |