John Gilmore [Thu, 19 Sep 1991 10:44:20 +0000 (10:44 +0000)]
* valprint.c (type_print_base): Avoid printing garbage for ints
of unusual sizes.
(_initialize_valprint): Warn about host/target size assumption;
improve long long support slightly.
John Gilmore [Thu, 19 Sep 1991 10:31:00 +0000 (10:31 +0000)]
* parse.c: New file with the common code remains of expread.y.
* expread.y, expread.tab.c: Remove.
* parser-defs.h: New file with common declarations from expread.y.
* c-exp.y: New file with the C parser from expread.y.
* m2-exp.y: New file with the Modula-2 parser.
John Gilmore [Thu, 19 Sep 1991 10:27:17 +0000 (10:27 +0000)]
* symtab.c (_initialize_symtab): Remove builtin type
definition and initialization to *-exp.y.
(lookup_primitive_typename): Use language-dependent vector.
(lookup_typename): Fix bug, make it work if primitive typename.
(lookup_unsigned_typename): Call above.
(create_array_type): Set up range type for array index.
(list_symbols): Call typedef_print to print typedefs.
(Currently #ifndef FIXME'd out awaiting integration.)
John Gilmore [Thu, 19 Sep 1991 08:51:16 +0000 (08:51 +0000)]
* main.c (execute_command): Warn as language changes automatically.
(main): If error() is called during early initialization, print
its message and then exit(1) from GDB.
John Gilmore [Thu, 19 Sep 1991 08:31:37 +0000 (08:31 +0000)]
* stack.c (frame_info): Print language of stack frame.
(select_frame): Also select language, if in auto-mode.
(get_frame_language): New subroutine.
Output hex with local_hex_string for Modula-2 support.
John Gilmore [Thu, 19 Sep 1991 02:54:17 +0000 (02:54 +0000)]
* breakpoint.c (breakpoint_cond_eval): Use new value_true to test
breakpoint condition language-independently.
Output hex with local_hex_string for Modula-2 support.
John Gilmore [Thu, 19 Sep 1991 02:32:35 +0000 (02:32 +0000)]
* symfile.c (allocate_symtab): New fn, consolidates the work
of allocating and initializing a new struct symtab. Set the
language of the symtab based on its filename extension.
* symfile.h: Declare it.
* mipsread.c (new_symtab): Use it. Minor formatting changes.
* dbxread.c (end_symtab): Use it.
* mipsread.c (parse_symbol, case stParam and stProc): Add #if 0'd
code for saving types of parameters with each function definition.
* dbxread.c (define_symbol, function and parameter cases): Ditto.
(read_dbx_symtab, case N_DEFD): Ignore.
(read_enum_type): Recognize FALSE/TRUE enum as Modula-2 BOOLEAN
type.
(read_range_type): Rename MAX_OF_TYPE to MAX_OF_C_TYPE, etc.
#if 0 out its uses, though, since they set a dead value.
* coffread.c (end_symtab): Use allocate_symtab.
(process_coff_symbol): #if 0'd for functions and params as above.
(read_enum_type): Recognize Modula-2 BOOLEAN.
John Gilmore [Wed, 18 Sep 1991 23:16:45 +0000 (23:16 +0000)]
* i387-tdep.c: New file, consolidates most 80387 support,
and eliminates host dependency on double<->extended conversions.
* i386-xdep.c, symm-xdep.c: Remove most 387 support.
* xconfig/i386{sco,v,v-g,v32,v32-g}: Now need i387-tdep.o.
John Gilmore [Fri, 13 Sep 1991 07:22:50 +0000 (07:22 +0000)]
* inferior.h: Eliminate CANNOT_EXECUTE_STACK in favor of
defining CALL_DUMMY_LOCATION as BEFORE_TEXT_END. This is
because machines that do this will also have to know to
set NEED_TEXT_START_END. Besides, it was a redundant way to
say the same thing.
* tm-29k.h, tm-convex.h, tm-np1.h: Eliminate
CANNOT_EXECUTE_STACK, define CALL_DUMMY_LOCATION and
NEED_TEXT_START_END.
John Gilmore [Fri, 13 Sep 1991 07:22:01 +0000 (07:22 +0000)]
* exec.c (exec_command): If NEED_TEXT_START_END, define the
variables and set them based on the exec file.
* am29k-tdep.c: declare text_start.
* valops.c (call_function_by_hand): declare text_end.
John Gilmore [Fri, 13 Sep 1991 01:10:22 +0000 (01:10 +0000)]
* Makefile.in (CLIBS): Put XM_CLIBS and TM_CLIBS at end.
Pass MUNCH_DEFINE to munch whenever we run it.
* munch: Cope with RT/PC putting fns in data segment.
Restore ability to override `nm' by specifying MUNCH_NM.
John Gilmore [Fri, 13 Sep 1991 01:06:04 +0000 (01:06 +0000)]
* tm-29k.h: Update BADMAG (though it should go away).
Allow the register definitions to be overridden in another
tm-file. Fix SR_REGNUM. Add a mess of _REGNUM's. Separate
RETURN_REGNUM from GR96_REGNUM and DUMMY_SAVE_GREGS from
DUMMY_SAVE_GR96, for handling kernel calling conventions
that use GR64+ rather than GR96+.
John Gilmore [Fri, 13 Sep 1991 00:13:16 +0000 (00:13 +0000)]
* configure.in: Add hosts rtpc-*-* and a29k-*-*.
Merge target arm case with other "easy" cases. Add target
cases a29k-*-none (rehack of am29k), a29k-*-kern (remote to
Ultracomputer kernel), and a29k-*-sym1 (ultracomputer OS's user
process).
John Gilmore [Thu, 12 Sep 1991 21:27:49 +0000 (21:27 +0000)]
* internalcoff.h (SYMNMLEN, FILNMLEN, DIMNUM): Define these
for internalcoff, separately from the various external coff's.
* amdcoff.h, bcs88kcoff.h, i386coff.h, intel-coff.h, m68kcoff.h,
m88k-bcs.h: Prefix SYMNMLEN, FILNMLEN, and DIMNUM with E_'s for
the external struct definitions.
* ecoff.h: Remove these #define's, kludge no longer needed.
John Gilmore [Tue, 10 Sep 1991 08:56:09 +0000 (08:56 +0000)]
* utils.c (error): if error_pre_print is set, print the string
first.
* main.c (main, print_gnu_advertisement, print_gdb_version):
Reformat legalese so it always prints, but acts as an "I'm here"
message while symbols are being read. If any errors occur,
print a few newlines to set off the message and start it at the
left margin. Remove mention of "help" command, and don't yak about
symbol reading.
(catch_errors): Error string is now printed first in case of
error, not last.
* command.c (undef_cmd_error, lookup_cmd): On undefined command,
suggest the "help" command.
John Gilmore [Mon, 9 Sep 1991 20:49:08 +0000 (20:49 +0000)]
* breakpoint.c (insert_breakpoints): Restore warning about
the program might be running in another process, but only for
systems with this brain death (#ifdef ONE_PROCESS_WRITETEXT).
* xm-hp300bsd.h, xm-mips.h, xm-vax.h: Define it.
John Gilmore [Fri, 6 Sep 1991 07:13:38 +0000 (07:13 +0000)]
Fix some infrastructure to be able to cope with host and target
machines with different sized basic types (ints, ptrs, etc).
(Idea from [email protected] (Pierre Willard).)
* values.c (value_from_longest): Rename from value_from_long.
Handle pointer types as well as integers, so that targets with
different pointer sizes from the host can be accomodated.
* breakpoint.c, convex-tdep.c, eval.c, expprint.c, printcmd.c,
valarith.c, valops.c, valprint.c, value.h, values.c: Rename
uses of value_from_long to value_from_longest.
John Gilmore [Fri, 6 Sep 1991 07:09:40 +0000 (07:09 +0000)]
Fix some infrastructure to be able to cope with host and target
machines with different sized basic types (ints, ptrs, etc).
(Idea from [email protected] (Pierre Willard).)
* value.c (value_from_longest): Rename from value_from_long.
Handle pointer types as well as integers, so that targets with
different pointer sizes from the host can be accomodated.
* breakpoint.c, convex-tdep.c, eval.c, expprint.c, printcmd.c,
valarith.c, valops.c, valprint.c, value.h, values.c: Rename
uses of value_from_long to value_from_longest.
* eval.c, findvar.c, printcmd.c, valarith.c, valops.c: Pass
the correct pointer type to value_from_long{est}.
* remote-vx.c: Remove obsolete code for calling functions via
vxworks kludge interface (it referenced value_from_long).
* valops.c (value_string): Find malloc with lookup_misc_func, not
raw search.
* breakpoint.c, remote-vx.c: Reword strings printed by
catch_errors callers.
John Gilmore [Wed, 4 Sep 1991 16:03:52 +0000 (16:03 +0000)]
* a.out.gnu.h, aout64.h: Add N_WARNING. Change N_FN to 0x0E,
to match SunOS and BSD. Add N_COMM as 0x12 for SunOS shared lib
support.
* stab.def: Add N_COMM to table, fix overlap comment.
John Gilmore [Wed, 4 Sep 1991 07:43:50 +0000 (07:43 +0000)]
Make writing to files work properly. (Fixes to BFD are also needed.)
* core.c (core_open): Open file ourselves, read or r/w, depending on
write_files. Use bfd_fdopenr.
* gdbcore.h (write_files): New variable.
* exec.c (write_files): Define variable, add set&show for it.
(exec_file_command): Use write_files to open for read or r/write.
Make shared library reading happen automatically. These changes
are mostly from Peter Schauer <[email protected]>.
* inferior.h (stop_soon_quietly): Add to exported variables.
* infrun.c (child_create_inferior): call solib hook, if defined.
(child_attach): call solib hook, if defined.
* solib.c: Include inferior.h. Add from_tty to so_list as kludge.
(find_solib): Use lookup_misc_func rather than hand-rolled.
(symbol_add_stub): New stub for catch_errors.
(solib_add): Avoid output if !from_tty. Catch errors rather
than just calling symbol_file_add and bombing.
(solib_create_inferior_hook): Interface with the target process
to let it read and alloc shared libs, then figure out what it did.
* utils.c (fputs_demangled): Avoid duplicate printing if
demangling is off. (Fix from J.T. Conklin <[email protected]>.)
* infrun.c (proceed): Cast -1 to (CORE_ADDR) before comparing.
(Fix from [email protected] (Pierre Willard).)
* main.c (catch_errors): Change argument to a char * from an int,
since a char * can point to a struct full of glop, but an int
is not guaranteed to be able to hold a pointer.
* breakpoint.c (breakpoint_cond_eval, bpstat_stop_status,
breakpoint_re_set_one, breakpoint_re_set): Adapt.
* core.c (core_open, solib_add_stub): Adapt.
* remote-vx.c (symbol_stub, add_symbol_stub, callers): Adapt.