* ch-exp.y (chill_create_fundamental_type): Chill uses fixed
width types. For example, "INT" is always 2 bytes regardless
of the values of any TARGET_*_BIT macros. So use explicit
numeric sizes for the types.
language specific fundamental types for C.
* m2-exp.y (m2_create_fundamental_type): New function to create
language specific fundamental types for Modula 2.
* c-exp.y (c_language_defn, cplus_language_defn): Add
c_create_fundamental_type to language struct initializers.
* m2-exp.y (m2_language_defn): Add m2_create_fundamental_type
to language struct initializers.
* dwarfread.c (expression.h, language.h): Include.
* dwarfread.c (ftypes): New array to hold fundamental types
for current compilation unit.
* dwarfread.c (cu_language_defn): New pointer to language
struct for language of current compilation unit.
* dwarfread.c (dwarf_fundamental_type): New function to
create/lookup fundamental types.
* dwarfread.c (set_cu_language): Initialize cu_language_defn.
* dwarfread.c (throughout): Replace lookup_fundamental_type
with dwarf_fundamental_type.
* dwarfread.c (read_file_scope): Zero out ftypes for each new
compilation unit (may be different language or different objfile).
* gdbtypes.c (lookup_fundamental_type): Move actual type
creations into language specific fundamental type creation
functions and call via create_fundamental_type. Add comment
about this function being obsolescent.
* gdbtypes.h (FT_BYTE, FT_UNSIGNED_BYTE): New types, true byte
sized signed and unsigned integers.
* gdbtypes.h (FT_NUM_MEMBERS): Increment, new types added.
* language.c (language_def): New function to lookup a language
struct given it's enumeration.
* language.h (struct language_defn): Add la_fund_type, a pointer
to a function that creates fundamental types for this language.
* language.h (create_fundamental_type): New macro to create
fundamental types based on the current language.
* language.h (language_def): Add prototype.
* language.c (unk_lang_create_fundamental_type): New function
for initializing language structs, calls error if called.
* language.c (unk_language_defn, auto_language_defn,
local_language_defn): Use unk_lang_create_fundamental_type.
**** start-sanitize-chill ****
ch-exp.y (chill_create_fundamental_type): New function.
ch-exp.y (chill_language_defn): Add chill_create_fundamental_type.
ch-exp.y (_initialize_chill_exp): BOOL types are only one byte.
**** end-sanitize-chill ****
rather than '$'. This particular piece of braindamage is
spreading like ooze. It's now infected libiberty, deja-gnu,
gdb, and gcc.
* values.c (baseclass_addr): Use CPLUS_MARKER rather than
hardwired '$' character.
read_struct_type function up into managable pieces.)
* stabsread.c (struct field_info): Local struct definition.
* stabsread.c (read_member_functions, read_struct_fields,
read_baseclasses, read_tilde_fields, attach_fn_fields_to_type,
attach_fields_to_type, read_cpp_abbrev): Prototypes and new
functions from fragmented read_struct_type.
* stabsread.c (stabs_general_complaint): Catchall complaint.
* stabsread.c (STABS_CONTINUE): Macro'ize cretinous stabs
symbol name continuation code. Use macro throughout.
* stabsread.c (various places): Replace add-one-to-pointer
with pointer increment.
* stabsread.c (read_type): Retain function local copy of type
descriptor. Rearrange code calling read_struct_type() to match
new conventions.
terminal tokens.
* ch-exp.y (access_name): New non-terminal token and
production.
* ch-exp.y (general_procedure_name): Now a terminal token.
* ch-exp.y (location): Expand production.
* ch-exp.y (match_simple_name_string): New function.
* ch-exp.y (yylex): Call match_simple_name_string and return
GENERAL_PROCEDURE_NAME or LOCATION_NAME as appropriate.
contants as a leading explicit length, followed by the string data,
followed by a trailing explicit length.
* eval.c (evaluate_subexp), expprint.c (print_subexp),
parse.c (length_of_subexp), parse.c (prefixify_subexp):
Use recorded explicit length of strings in expression elements,
rather than strlen. Adjust code to skip over strings stored in
expression elements, and code to access strings, to account for
new leading explicit size expression element.
* parse.c (length_of_subexp): Test for minimum endpos of 1, not
0, to avoid negative expression element indices.
* valops.c (search_struct_method): Minor whitespace change.
which together maintain a dynamically expandable static buffer
for the lexer to use when translating C strings to their internal
form (other future uses possible). Fix parsing of C style strings
to do the normal C style input conversions of escaped character
sequences.
* valops.c (value_string): Remove translation of escaped
character sequences, now done in C expression parser.
and decides if it should be printed in literal form or some other
form, based on it's ASCII value and setting of sevenbit_strings.
* {c-exp.y, m2-exp.y} (emit_char): Use new PRINT_LITERAL_FORM
macro, change indentation style.
**** start-sanitize-chill ****
* ch-exp.y (chill_printchar): Use new PRINT_LITERAL_FORM macro.
* ch-exp.y (chill_printstr): First cut at real function instead
of error stub.
**** end-sanitize-chill ****
* defs.h (printchar): Replace with gdb_printchar.
* language.h (language_defn): Add new function pointers
la_printchar and la_printstr, to do language dependent
printing of characters and strings.
* language.h (local_printchar, local_printstr): New macros
to call language dependent functions pointed to by la_printchar
and la_printstr respectively.
* c-exp.y (emit_char, c_printchar, c_printstr): New language
dependent functions for printing characters and strings.
* c-exp.y (c_language_defn, cplus_language_defn): Add
c_printchar and c_printstr.
* command.c (do_setshow_command): Rename printchar use to
gdb_printchar.
* expprint.c (print_subexp): Replace C style string output
with call to local_printstr.
* language.c (unk_lang_printchar, unk_lang_printstr):
New stubs, currently errors.
* language.c (unknown_language_defn, auto_language_defn,
local_language_defn): Add unk_lang_printchar and
unk_lang_printstr.
* m2-exp.y (emit_char, m2_printchar, m2_printstr): New
language dependent functions to print characters and strings.
* m2-exp.y (m2_language_defn): Add m2_printchar and m2_printstr.
* utils.c (printchar): Renamed to gdb_printchar.
* valprint.c (print_string): Remove prototype, function moved
to c-exp.y, where it becomes c_printstr.
* valprint.c (print_max): Made global for reference from the
language dependent printing routines in *-exp.y.
* valprint.c (repeat_count_threshold): New variable with function
of old REPEAT_COUNT_THREHOLD define, but now settable by user.
Change all references to old macro to references to new variable.
* valprint.c (value_print, val_print): Replace calls to
print_string with calls to local_printstr.
* valprint.c (val_print): Replace C style character printing
with call to local_printchar.
* valprint.c (val_print): Add case for TYPE_CODE_CHAR.
* valprint.c (_initialize_valprint): Add add_show_from_set
call for setting up repeat_count_threshold as print variable.
**** start-sanitize-chill ****
* ch-exp.y (decode_integer_value): New function.
* ch-exp.y (decode_integer_literal): Use decode_integer_value.
* ch-exp.y (chill_printchar, chill_printstr): New language
dependent functions for printing characters and strings.
* ch-exp.y (chill_language_defn): Add chill_printchar and
chill_printstr.
**** end-sanitize-chill ****
char of env value if an '=' appears in it. Bug report and fix
by Mark Jungerman, <maj@lucid.com>.
Thu Nov 5 23:04:38 1992 Rob Ryan (rr2b@andrew.cmu.edu)
* xcoffexec.c (vmap_symtab): fixed a bug where if a object has no
member, and the stat pointer passed to vmap_symtab was NULL, the
wrong vmap entries would be modified. Fixes behavior where
attempting to load symbols for a module with no member would mess
up already read in symbols.
Fix from maj@lucid.com.
* remote-udi.c (udi_open): Reset vars so that user can re-run
programs without leaving GDB.
* (many routines): Slightly improve error handling.
* (download): Zero out BSS by longs instead of bytes to avoid
timeouts in real hardware.
* 29k-share/udi/udip2soc.c (UDIDisconnect, UDIKill): Indicate
that connection is no longer in use after shutdown() of socket.
This keeps GDB from dying of a SIGPIPE when you issue multiple
`target udi' commands.
local formatting information.
* language.h (language_defn): Replace individual format info
with language_format_info structs.
* language.h (local_*_format, local_*_format_prefix,
local_*_format_specifier, local_*_format_suffix): New macros
for binary/octal/decimal/hex formats to access info elements.
* c-exp.y (c_language_defn): Update for new format handling.
* m2-exp.y (m2_language_defn): Update for new format handling.
* dbxread.c (language.h): Include for partial-stab.h use.
* defs.h (local_hex_format, local_hex_format_custom,
local_hex_string, local_hex_string_custom): Move to language.h.
* language.c (local_hex_format_custom, local_hex_string,
local_hex_string_custom, local_octal_format_custom): Use new
format handling.
* language.c (unknown_language_defn, auto_language_defn,
local_language_defn): Update for new format handling.
* printcmd.c (print_scalar_formatted): Use new macros
to access decimal and binary format info for printing.
**** start-sanitize-chill ****
* c-exp.y (chill_language_defn): Update for new format handling.
* ch-exp.y (CHARACTER_LITERAL): Add support to yylex.
* ch-exp.y (match_integer_literal): Add function.
* ch-exp.y (builtin_type_chill_char): Add definition.
* gdbtypes.h (builtin_type_chill_char): Add declaration.
**** end-sanitize-chill ****
* tm-rs6000.h (BELIEVE_PCC_PROMOTION): Define, since AIX cc gets
it right.
(aix_framedata): added nosavedpc field.
(SAVED_PC_AFTER_CALL): Don't try to optimize; just call
read_register.
(FRAMELESS_FUNCTION_INVOCATION): Pass second argument of 0.
(FRAME_SAVED_PC): If PC not saved, use SAVED_PC_AFTER_CALL.
* rs6000-tdep.c (skip_prologue): Handle gcc generated stfd
instructions as function_frame_info does. Expand special case of
st r31,-4(r1) to be st r31,NUM(r1), since gcc can generate offsets
other than -4.
(pop_frame): Add 4 rather than sizeof (int) to avoid host
dependence.
(function_frame_info): Set frameless if the function has no frame,
and set nosavedpc if the PC was not saved. Handle gcc generated
stfd 31,-4(31); st 31, -12(31) correctly.
(frameless_function_invocation): New second argument pcsaved; if 0
return whether the function has a frame, if 1 return whether the
function saved PC.
(frame_initial_stack_address): Correct typo: cache registers for
callee_fi, not for fi, (avoids reading garbage memory locations).
* symtab.c (find_pc_psymtab): Clean up a bit.
* (find_pc_symtab): Fix comments, clean up code.
* (find_pc_line): General cleanups, efficiency improvements.
Also, don't return garbage when some line info exists, but there
was no good match.
29k-share/dfe/mini2udi.o.
* config/a29k-udi.mt: Remove yank.o and mini2udi.o.
* alldeps.mak, depend: Update to deal with removal of
aforementioned files.
* remote-udi.c: Major cleanups. Clean up udi_open and drop
requirement for useless 'program' argument. Clean up
udi_create_inferior, and udi_load to call common download()
routine. Create download routine to load remote hosts directly
(with the help of BFD) so that we don't need yank.c and
mini2udi.c.
Fix udi_detach to call UDIDisconnect with
the right arguments. Clean up udi_resume, don't assign tip_error
twice. Clean up udi_wait, straighten out status codes. Make
udi_kill really work.
removed redundant parse rules. (YYSTYPE): added typed_val, removed
UINT and CHAR rules. (parse_number): work out the targetwise type
of a number based upon it's size and qualifiers. (yylex): chars
are now treated the same way as ints.
* source.c (indentify_source_line): don't core dump if wanted
line is larger than number of lines in source. (can happen when
coff gets confused about #included source).
when debugging a program with 100 shared libraries.
* solib.c (solib_map_sections): Always close the BFD we open.
Free all malloc'd storage we allocate, too, including error cases.
(struct so_list): Remove unused so_bfd member.
(clear_solib): Don't bother closing so_bfd.
* symfile.c (symfile_bfd_open): Mark newly opened BFD as
cacheable. `So many symbol files, so little file descriptors.'
Stubs should stand alone as much as possible.
* source.c (show_directories): Avoid printf_filtered length prob
pointed out by Jonathan Stone.
* i960-pinsn.c (MEM_MAX, MEM_SIZ): Set upper limit properly to
avoid accesses beyond end of table. Fix by Lee W. Cooprider,
<Lee_Cooprider@vos.stratus.com>.
* go32-nat.c: Remove, there is no native go32 support.
* go32-xdep.c: Remove unused fork, fvork, wait, execlp, kill_inferior.
* infcmd.c (run_command): Avoid long calls to printf_filtered.
Bug fix courtesy of Alexander Klaiber.
new routines to deal with sending SIGINTs to attached processes
when the user interrupts the controlling GDB.
* inftarg.c (child_wait), procfs.c (procfs_wait): Add calls to
the aforementioned routines when waiting for the attached process.
* minsyms.c (lookup_minimal_symbol_by_pc): subtract 1, not 2, from
minimal_symbol_count, because the NULL symbol is not included in
the count. This prevented this function from finding the last
symbol in the table.
* dbxread.c (process_one_symbol): if not defined
(BLOCK_ADDRESS_FUNCTION_RELATIVE), set function_start_offset at
the start of the function, not just after N_FUN.
remap all malloc's to xmalloc's and all realloc's to xrealloc's.
* c-exp.y, m2-exp.y: Add comment about how malloc/realloc are
remapped to xmalloc/xrealloc, use only malloc/realloc in grammer
file. Remove preprocessor defines that previously did remapping.
Wind River stole them from the Sun Unix distributions.
We can't distribute them in an FSF GDB release.
We should even rewrite them for our own releases, though that is not
as urgent.
Until these two files are rewritten, VxWorks support in GDB will not compile.
The i960 support can be gained by just rewriting the ptrace.h file.
Only small amounts of the reg.h file need to be rebuilt -- compile
remote-vx.c to see what is needed.
John
is null.
* tm-sun4sol2.h (PROLOGUE_FIRSTLINE_OVERLAP): Remove -- it
causes problems in setting breakpoint in the right place in
functions with `float' args which are passed as doubles.
* xm-vaxbsd.h (MEM_FNS_DECLARED): Avoid erroneous redecl's.
* config/rs6000.mh (NATDEPFILES): Add corelow.o.
* dwarfread.c: include <sys/types.h> for SCO.
* infptrace.c: Don't include ptrace.h under SCO.
* config/i386sco.mh: Use -D_POSIX_SOURCE instead of -posix for
gcc.
* config/i386v.mt: Add exec.o to TDEPFILES.
* irix4-nat.c: Remove externs of registers[], include inferior.h
instead.
* mips-nat.c: Explicitly initialize zerobuf to 0!
* mips-tdep.c (init_extra_frame_info): Undo John's last change.
Always setup fci->frame, even if it's non-zero. Too many places
depend upon this behavior (and I have to get a release out the
door)!
* mipsread.c (parse_partial_symbols, psymtab_to_symtab_1): Set
processing_gcc_compilation if we find the embedded stabs marker.
This fixes several bugs with finding the location of short or char
function parameters passed on the stack.
coredep.c, but zero out FP_REGNUM & ZERO_REGNUM so that stack
backtraces from core files work.
* config/decstation.mh, config/irix3.mh: Remove coredep.o.
Functions are now defined in mips-nat.c.
* doc/gdbint.texinfo: Update GET_LONGJMP_TARGET, L_SET doc.
* irix4-nat.c, mips-nat.c (JB_ELEMENT_SIZE, get_longjmp_target):
Move from mips-tdep.c and tm-{irix3,mips}.h.
* mips-nat.c: Remove a bunch of code that was ifdef'd out of
native MIPS ports.
* nm-irix3.h, nm-mips.h (GET_LONGJMP_TARGET): Move from tm-irix3.h
and tm-mips.h.
* ultra3-nat.c (register_addr): Move from ultra3-xdep.c.
(fetch_core_registers): Fix bfd_seek arguments.
(OBS): Put version.o first, so Makefile rebuild happens early.
* command.h: Publicize prototype for not_just_help_class_command.
* command.c: Remove proto.
* maint.c: Mark "mt" as an abbrev, to avoid duplicated help
output. Move "maint info" from class info to class maintenance,
and improve text.
* infrun.c: Move "stop" to class_obscure, and give it a
function so it will not be seen as a global help topic. FIXME,
it should be possible to set these attributes independently.
* core.c (core_command): Make nicer error message for no core support.
* dbxread.c (read_dbx_symtab): Use L_SET as bfd_seek arg.
(elfstab_build_psymtabs): staboffset and stabstroffset args are
file_ptr's.
* dwarfread.c (struct dwfinfo): Convert dbfoff, lnfoff to file_ptr.
(scan_compilation_units): Punt unused filename arg. dbfoff,
lnoffset, and curlnoffset are file_ptr's now.
(dwarf_build_psymtabs): Drop desc and filename args; use
objfile. dbfoff and lnoffset are file_ptr's now.
(read_ofile_symtab): foffset is now file_ptr. Use L_SET in bfd_seek.
* elfread.c (struct elfinfo): dboffset and lnoffset are file_ptr's.
(elf_symfile_read): Skip desc and filename args to
dwarf_build_psymtabs. Pass file_ptr's to elfstab_build_psymtabs.
* gdb-stabs.h: Use file_ptr rather than off_t.
* mipsread.c (fixup_symtab): f_ptr is a file_ptr. Re-enable
compile-time debug check that someone turned off as "unused".
(read_the_mips_symtab): st_filptr is a file_ptr. Fix bfd_seek call.
* symfile.h: Update dwarf_build_psymtabs and
elfstab_build_psymtabs prototypes.
* xcoffread.c (init_stringtab, init_lineno, xcoff_symfile_read):
Use file_ptr offsets. bfd_seeks use L_SET.
symbol. #define MIPS_EFI_SYMBOL_NAME instead. Use different
value so that demangler won't be invoked. This greatly speeds up
stepping.
* mips-tdep.c (mips_pop_frame): Rewrite handling of
linked_proc_info so that it properly deallocates the appropriate
item after it is done with it instead of before.
* Don't pass bogus frame pointer to create_new_frame(). Just
leave it as zero so that lower level code will figure out the
correct value.
* xm-hppah.h: if __STDC__ is not defined, define
HPPA_COMPILER_BUG.
symtab.c (decode_line_1): avoid a bug in the HP9000/700 native
compiler; see the comment in the file.
Here's the comment from the file:
/* FIXME: The native HP 9000/700 compiler has a bug which appears
when optimizing this file with target i960-vxworks. I haven't
been able to construct a simple test case. The problem is that
in the second call to SKIP_PROLOGUE below, the compiler somehow
does not realize that the statement val = find_pc_line (...) will
change the values of the fields of val. It extracts the elements
into registers at the top of the block, and does not update the
registers after the call to find_pc_line. You can check this by
inserting a printf at the end of find_pc_line to show what values
it is returning for val.pc and val.end and another printf after
the call to see what values the function actually got (remember,
this is compiling with cc -O, with this patch removed). You can
also examine the assembly listing: search for the second call to
skip_prologue; the LDO statement before the next call to
find_pc_line loads the address of the structure which
find_pc_line will return; if there is a LDW just before the LDO,
which fetches an element of the structure, then the compiler
still has the bug. */
* tm-i386bsd.h, xm-i386bsd.h: New config files.
* i386b-nat.c: New native support file.
* configure.in: Add host and target for i[34]86-*-bsd*.
* config/i386bsd.mh, config/i386bsd.mt: New config files.
* nindy-share/nindy.c (coffstrip): Use that pathname, instead of searching for
a "bfd_strip" program. Also, fixed up arguments passed to that program.
* tm-nindy960.h (ADDITIONAL_OPTIONS): Use "-ser" rather than "-r", which is now
used for something else. Rewrite description of associated parameters to match
how gdb does it now.
(ADDITIONAL_OPTION_HELP): Fix message accordingly.
* m68k-pinsn.c (print_insn_arg): Handle new "`" operand type.
in the ser-*.c files. Needed for some systems, such as GO32, which don't
have stuff like <termios.h>. Makefile.in now uses $(REMOTE), which defaults
to remote.o, instead of remote.o.
Specifically, the calling of inferiors methods is improved.
* value.h: New macros METHOD_PTR_IS_VIRTUAL,
METHOD_PTR_FROM_VOFFSET, METHOD_PTR_TO_VOFFSET to partially
hide the implementation details of pointer-to-method objects.
How to tell if the pointer points to a virtual method is
still very dependent on the particular compiler, but this
should make it easier to find the places to change.
* eval.c (evaluate_subexp [case OP_FUNCALL]), valprint.c
(val_print [case TYPE_CODE_PTR]): Use the new METHOD_PTR_*
macros, instead of a hard-wired-in code that incorrectly
assumed a no-longerused representation of pointer-to-method
values. And otherwise fix the relevant bit-rotted code.
* valprint.c (type_print_base [case TYPE_CODE_STRUCT]):
If there are both fields and methods, put a space between.
* stabsread.c (read_struct_type): Fix bug in handling of
GNU C++ anonymous type (indicated by CPLUS_MARKER followed
by '_'). (It used to prematurely exit the loop reading in
the fields, so it would think it should start reading
methods while still in the fields. This could crash gdb
given a gcc that can emit nested type information.)
* valops.c (search_struct_method): Pass 'this' value by
reference instead of by value. This provides a more
consistent interface through a recursive search where the
"bottom" functions may need to adjust offsets (due to multiple
inheritance).
* valops.c, value.h, values.c: Pass extra parameters to
value_fn_field and value_virtual_fn_field so we can
correctly adjust offset for multiple inheritance.
* eval.c (evaluate_subexp [case OP_FUNCALL]): Simplify
virtual function calls by using value_virtual_fn_field().
* values.c: New function baseclass_offset, derived from
baseclass_addr (which perhaps can be made obsolete?).
It returns an offset rather than an address. This is a
cleaner interface since it doesn't mess around allocating
new values.
* valops.c (search_struct_method): Use baseclass_offset
rather than baseclass_addr.
* remote-udi.c (udi_resume): Clean up.
* (udi_wait): Rewrite, leave out bugs.
* Add debugging code to print out all register fetches and stores.
* Straighten out target_ops.
* tm-29k.h (DUMMY_FRAME_RSIZE): Pad out to doubleword.
* remote-udi.c (udi_create_inferior): run with no arguments should
not pass the program name as an argument, since the UDI code
already handles that.
(udi_load): get the symbols from prog_name, not arg_string (the
load command should really use arg_string as the program name, not
prog_name, but at least the run command works now).
* am29k-tdep.c (_initialize_29k): Make it possible for the
user to set and query the address where function calls into the
inferior write a small scratch routine. `set call_scratch_address'
* inferior.h (PC_IN_CALL_DUMMY): Fix fencepost error.
* remote.c (remote_prepare_to_store): Only fetch regs if they are
not already cached validly.
* infptrace.c: remove #ifdef USG from around include ptrace.h.
machines without this header should not be compiling this file.
* nm-rs6000.h, rs6000-nat.c: new files for native support.
* rs6000-tdep.c: do not include sys/ptrace.h or sys/reg.h.
* rs6000-xdep.c: removed. all code now in rs6000-nat.c.
* xm-rs6000.h: do not include ptrace.h.
(ATTACH_DETACH, FETCH_INFERIOR_REGISTERS): moved to nm-rs6000.h.
* config/rs6000.mh (XDEPFILES): removed rs6000-xdep.o.
infptrace.o and inftarg.o move to NATDEPFIES.
(NAT_FILE, NATDEPFILES): new macro for native support.
* config/sun3os3.mh, config/sun3os4.mh (NAT_FILE, NATDEPFILES):
new macros for native support.
(XDEPFILES): moved infptrace.o and inftarg.o to NATDEPFILES,
removed sun3-xdep.o.
* xm-sun3.h (ATTACH_DETACH, FETCH_INFERIOR_REGISTERS): moved to
nm-sun3.h.
* sun3-xdep.c: removed. All code is now in sun3-nat.c.
* sun3-nat.c, nm-sun3.h: new files for native support.
* dwarfread.c (dwarf_build_psymtabs): Rename dbsize parameter to
dbfsize and use it to initialize new local file scope dbsize.
* dwarfread.c (read_ofile_symtab): Initialize dbsize and use it.
* dwarfread.c (basicdieinfo): Use dbsize to check for oversize
DIEs as well as the current check for undersize DIEs. This helps
to gracefully detect and reject corrupted DIE information.
* command.h (struct cmd_list_element): Remove unused `aux'
field. Add new `hook', `hookee', and `cmd_pointer' fields.
* command.c (add_cmd): Initialize new fields, elim old.
(add_alias_cmd): Clone new fields.
(delete_cmd): Un-hook hookee if we're deleting hook.
(help_cmd): Tell user the command is hooked, if it is.
(lookup_cmd_1): Abbreviations return the original command
instead of themselves, so that hooks on the original cmd will be
run.
* defs.h (enum command_class): Add class_pseudo and comments.
* gdbcmd.h (execute_user_command): Add prototype.
* infrun.c (normal_stop): If the stop command is hooked,
run the hook whenever we stop.
(hook_stop_stub): Stub for catch_errors.
(_initialize_infrun): Set up pseudo "stop" command.
* main.c (execute_user_command): Code extracted from execute_command.
(execute_command): If hooked, run the hook before the command.
(define_command): If defining a new hook, check the command it
is hooking, and warn if none. Install the hook.
* source.c (_initialize_source): "l" is an abbrev for "list".
* doc/gdb.texinfo: Document command hooks.
* Makefile.in (VERSION): Roll to 4.6.7.
* config/sun4os4.mh: Remove dup inftarg.o from NATDEPFILES.
* infrun.c (breakpoints_inserted): Make it static again.
* tm-symmetry.h (FLOAT_INFO): #if 0 it for cross-ptrace abuse.
* nat-sparc.c -> sparc-nat.c
* nat-sun4os4.h -> nm-sun4os4.h
* nat-trash.h -> nm-trash.h
* configure.in: link to nm.h rather than nat.h.
* infptrace.c: include nm.h rather than nat.h.
* Makefile.in (TSOBS): removed corelow.o.
* infptrace.c: included nat.h.
* nat-trash.h: temporary header file. This should be removed once
all hosts have the native/host/target split.
* configure.in: add a symlink from nat-trash.h to nat.h if no
other nat file exists for this configuration.
* sparc-tdep.c: no longer include sys/ptrace.h.
* sparc-xdep.c: removed. contents have been moved to nat-sparc.c.
* xm-sparc.h (ATTACH_DETACH, FETCH_INFERIOR_REGISTERS): moved to
nat-sun4os4.h.
* nat-sparc.c, nat-sun4os4.h: new files for sun4 native support.
* config/sun4os4.mh (XDEPFILES): moved infptrace.o and inftarg.o
to NATDEPFILES. removed sparc-xdep.o.
(NATDEPFILES, NAT_FILE): new macros for native support.
* Makefile.in (TSOBS): removed corelow.o.
* infptrace.c: included nat.h.
* nat-trash.h: temporary header file. This should be removed once
all hosts have the native/host/target split.
* configure.in: add a symlink from nat-trash.h to nat.h if no
other nat file exists for this configuration.
* sparc-tdep.c: no longer include sys/ptrace.h.
* sparc-xdep.c: removed. contents have been moved to nat-sparc.c.
* xm-sparc.h (ATTACH_DETACH, FETCH_INFERIOR_REGISTERS): moved to
nat-sun4os4.h.
* nat-sparc.c, nat-sun4os4.h: new files for sun4 native support.
* config/sun4os4.mh (XDEPFILES): moved infptrace.o and inftarg.o
to NATDEPFILES. removed sparc-xdep.o.
(NATDEPFILES, NAT_FILE): new macros for native support.
particular type of core file support.
* target.h (find_core_target): new prototype.
* target.c (find_core_target): new function. Walks the target
list looking for the core target.
* core.c (core_file_command): replace calls to core_detach and
core_open with find_core_target and direct calls.
* tm-hppa.h (CLEAN_UP_REGISTER_VALUE): Use it.
* hppa-coredep.c: Remove, now that we use the hook.
* config/hppab.mh, config/hppah.mh: Use standard coredep.o.
* hppab-xdep.c, hppah-xdep.c: Remove custom code, use hook.
* dbxread.c, partial-stab.h: Replace all #ifdef hp9000s800's with
GDB_TARGET_IS_HPPA's. This is a SERIOUS KLUDGE. The code needs to all
be ripped out and reimplemented right (see elfread.c).
* tm-hppa.h (GDB_TARGET_IS_HPPA): Define.
* inferior.h (proc_wait, inferior_proc_init, proc_set_exec_trap):
No longer global functions.
(fork_inferior): New global function from fork-child.c.
* inftarg.c (child_wait): Remove USE_PROC_FS conditional.
(ptrace_me, ptrace_him): New stub functions for fork_inferior().
(child_create_inferior): Moved to fork-child.c as fork_inferior.
(child_create_inferior): New tiny function that calls fork_inferior.
* fork-child.c: New file, containing fork_inferior, which is
built from slight mods to inftarg.c's child_create_inferior.
* procfs.c (procfs_ops): Add target vector.
(attach): Rename as static do_attach.
(procfs_create_inferior): New tiny function that calls fork_inferior.
(child_xfer_memory): Rename to static procfs_xfer_memory.
(store_inferior_registers): Rename to static procfs_store_registers.
(inferior_proc_init): Rename to static procfs_init_inferior.
(procfs_attach, procfs_detach, procfs_prepare_to_store,
procfs_files_info, procfs_open, procfs_mourn_inferior,
procfs_can_run): Slightly mangled copies of the corresponding
child_XXX routines from inftarg.c.
(proc_wait): Renamed to static procfs_wait.
(child_resume): Rename to static procfs_resume.
(fetch_inferior_registers): Rename to static procfs_fetch_registers.
(initialize_proc_fs): Rename to initialize_procfs. Set up
procfs_ops, too.
* xm-irix4.h, xm-sysv4.h (CREATE_INFERIOR_HOOK): No longer needed.
* regex.c: Always rename bcopy to memcpy, etc.
FIXME: Eventually do the renames rather than use #define's.
* sparc-tdep.c (deferred_stores): Moved from sparc-xdep.c.
Fix bcopy->memcpy.
* sparc-xdep.c: Move deferred_stores to target dependent.
config/*.mh files.
* config/*.mh: Add inftarg.o and fork-child.o to all *.mh that
reference infptrace.o. Add fork-child.o to all *.mh that
reference procfs.o.
* target.h: Comments on target_attach args and results.
* infcmd.c (attach_command): Check for existing execution, call
target_attach, set up terminal status and wait_for_inferior, wait
for the attach status, and do normal_stop.
* inftarg.c (child_attach): Remove target independent stuff.
* remote-adapt.c (adapt_attach): Ditto.
* remote-mm.c (mm_attach): Ditto.
* remote-udi.c (udi_attach): Ditto.
* remote-vx.c (vx_attach): Ditto.
Cleanup.
* remote-hms.c (hms_attach): Remove completely, it was useless.
* remote-mm.c, remote-hms.c, remote-udi.c, remote-adapt.c: Remove
commented-out start_remote calls.
* remote-hms.c, remote-adapt.c, remote-mm.c, remote-udi.c: Remove
DENTER and DEXIT macros and their calls. Use a real debugger --
like gdb -- to see what functions are being called when.
fix to differentiate between gcc1 & gcc2 compiled files so that we
can debug calls that pass structs as args correctly.
* symmisc.c (dump_symtab): If block was compiled with gcc, say
so, and what version.
ANSI compiler warnings.
* energize.h: Move all external struct decls to inside of
__STDC__, add prototype for energize_shell_wait().
* energize.c (getpty): Clean up, make us really get a controlling
terminal.
* (energize_initialize): Disable SIGIO prior to setting up for
I/O interrupts. Move setsid(), et. al. to getpty().
* (energize_shell_wait): New routine to wait for things started
via the shell command, uses wait() instead of /dev/proc.
* Also, add prototype for execute_command_1().
child_mourn_inferior): collect unix child process stratum
functions which live below the target vector into this file to
facilitate host/target/native split. Also, make them static.
* inflow.c (child_mourn_inferior): removed.
* infrun.c (child_create_inferior, child_attach): removed.
(resume): becomes global so that functions below the
target vector can find it.
* inferior.h (resume): add prototype.
(child_mourn_inferior, child_create_inferior, child_attach):
remove prototypes.
process will be the default target.
* target.c (find_default_run_target, find_default_attach,
find_default_create_inferior, return_zero): new functions.
(cleanup_target): Make return_zero the default for to_can_run.
* exec.c (exec_ops), core.c (core_ops): Replace child_attach and
child_create_inferior references with find_default_XXX instead.
* target.h (struct target_ops): new field, to_can_run.
(find_default_attach, find_default_create_inferior): new prototypes.
(target_can_run): new macro.
* Also added a zero (default) to_can_run element to all static
struct target_ops initializations throughout GDB, except:
* inftarg.c (child_ops): Use new child_can_run() to enable child runs.
* infrun.c (child_create_inferior): Clean up error handling when
no exec file is specified.
(child_attach): Don't require exec file.
through the target vector.
* inferior.h (kill_inferior_fast): remove declaration.
* main.c (disconnect): call quit_cover using catch_errors rather
than calling kill_inferior_fast directly. New way goes through
the target vector, handles attached processes, and writes
command history if appropriate.
(quit_cover): new function, wrapper for quit_command.
* convex-xdep.c, go32-xdep.c, hppabsd-xdep.c, hppahpux-xdep.c,
infptrace.c, procfs.c: Removed all instances of kill_inferior_fast,
inlining them into the local kill_inferior when needed.
Mon Sep 21 14:54:35 1992 Ian Lance Taylor (ian@cygnus.com)
* m68k-pinsn (print_insn_arg, fetch_arg): added support for
operands to memory management instructions, from WRS.
Replace with simple default to C before processing any init
files. There MUST be a language set, even in the absence of
init files or executables, or expression parsing fails.
symfile.c. Fixup places where command files are processed to
be consistent in setting a default language if none has been
previously set.
* symfile.c (set_initial_language): Add code moved from
main() that sets an initial default language when a new
symbol file is read.
* symfile.c (symbol_file_command): Call set_initial_language.
* symtab.c (find_main_psymtab): Add FIXME comment.
* blockframe.c (get_prev_frame_info): If INIT_FRAME_PC_FIRST is
set, run it before INIT_EXTRA_FRAME_INFO.
* stack.c (frame_info): If PRINT_EXTRA_FRAME_INFO defined, call it.
* mips-tdep.c (init_extra_frame_info): Only clobber the `frame'
(FP) value in the frame_info struct if it is zero (as from top of
execution stack).
(setup_arbitrary_frame): Implement FRAME_SPECIFICATION_DYADIC.
* mips-xdep.c (fetch_inferior_registers): ZERO_REGNUM always
comes back as zero. So does FP_REGNUM, as a trigger for
init_extra_frame_info.
* tm-mips.h (INIT_FRAME_PC_FIRST): Kludge, FIXME, defined to get
the program counter set before INIT_EXTRA_FRAME_INFO is run.
(INIT_FRAME_PC): Defined to null.
(PRINT_EXTRA_FRAME_INFO): print frame pointer location via symtab.
(FRAME_SPECIFICATION_DYADIC): Ask for two args in frame command.
Briefly explain MIPS stacks in GDB.
Rich and I believe the "real problem" was that both single_step
and target_resume were issuing PT_CONTINUE calls. This would
cause the second PT_CONTINUE to sometimes fail because the process
was already running.
* infptrace.c (child_resume): Remove AIX_BUGGY_PTRACE_CALL kludge.
* infptrace.c (child_resume): Don't deal with NO_SINGLE_STEP
here; it is dealt with at a gdb-target-independent level.
* rs6000-tdep.c (single_step): Don't call ptrace, we are a
high toned routine. Fix return type to void.