Commit graph

3727 commits

Author SHA1 Message Date
Mark Alexander
c1fc093571 * mips-tdep.c (IS_MIPS16_ADDR, MAKE_MIPS16_ADDR, UNMAKE_MIPS16_ADDR):
New macros for testing, setting, and clearing bit 0 of addresses.
	Change numerous bits of code where bit 0 was being manipulated
	to use these macros.
1997-02-28 03:00:51 +00:00
Mark Alexander
d6ca85a8ca * remote-mips.c: Put back the form feeds. 1997-02-27 22:14:22 +00:00
Mark Alexander
266454ca50 * remote-mips.c: Remove form feeds (^L) from source.
(mips_initialize): LSI PMON doesn't support 'set regsize' command.
	(pmon_wait): Don't need to exit and re-enter debug mode on LSI
	PMON after a continue; it causes target program misbehavior.
	(mips_fetch_register): Don't fetch unsupported registers; this
	cuts down on wasted serial traffic.
1997-02-27 21:45:29 +00:00
Stu Grossman
c4c9112ad8 * configure.in configure (HPUX/OSF thread support): Enable this
only when running GCC, since HP's thread header files use ANSI C
	which is not supported by their default compiler.
1997-02-27 18:09:22 +00:00
Stu Grossman
bfde4a671b * configure.host (i[3456]86-*-windows): Disable long long
support for WinGDB.  Add mswin to configdirs.
	* configure.in configure:  Move calls to configure.host and
	configure.tgt to the top of configure.in to allow them to set
	config variables before they are referenced.
1997-02-27 17:46:18 +00:00
Peter Schauer
f3cc5a0ea4 * stabsread.c (read_type): Fix handling of template names
with template parameters containing `::'.

	* valops.c (search_struct_field, search_struct_method):
	Pass correct valaddr parameter to baseclass_offset.
	Prevent gdb crashes by making sure that the virtual base pointer
	from an user object still points to accessible memory.
1997-02-22 11:42:07 +00:00
Mark Alexander
6e5d087d12 * maint.c: Eliminate -Wall warnings by including some header files. 1997-02-18 21:36:36 +00:00
Mark Alexander
1387cba164 * remote-sim.c (init_callbacks): Undo previous change. 1997-02-18 21:05:55 +00:00
Stu Grossman
e1a51cc222 * remote-vx.c (vx_attach): Fix for PR 11356. Remove code added
by kung.  It made no sense.
1997-02-16 01:50:18 +00:00
Ian Lance Taylor
4fbc396d5b * main.c (print_gdb_help): Make static to match declaration. 1997-02-14 18:00:34 +00:00
Dawn Perchik
e36491f4a5 * remote-e7000.c, ser-e7kpc.c, serial.c: Remove // comments. 1997-02-14 02:20:48 +00:00
Dawn Perchik
8662603f08 * debugify.c, debugify.h: Make safe for non-ansi compilers. 1997-02-13 00:01:21 +00:00
Dawn Perchik
2dec49333b * defs.h: Fix prototypes for new cleanup functions. 1997-02-12 23:32:50 +00:00
Dawn Perchik
27e81a4e1b * debugify.c, debugify.h: Fix for general gnu use. Remove C++
comment, add PARAMS, add license info and fix indentation.
1997-02-12 23:16:32 +00:00
Dawn Perchik
4659e3b367 * debugify.c, debugify.h: New files. Provide common macros
for writing debug info to a log file or stdio.
1997-02-12 22:48:45 +00:00
Dawn Perchik
be733f5841 * c-valprint.c (c_val_print): Fix printing for arrays defined
with 0 length.  A sticky tag caused this fix from
        revision 2.32 date: 1996/04/29 23:25:27;  author: dawn;
        state: Exp;  lines: +1 -0 branches:  2.32.34;
        to not make it into devo.
1997-02-12 10:49:20 +00:00
Dawn Perchik
16a43bf443 * defs.h: Fix cntl-C to read from the Windows message queue.
Add prototypes for make_final_cleanup (and the other cleanup
	routines.
	* remote-e7000.c: Fix sync code to timeout if unable to sync.
	Change sync code to report status while trying to sync-up
	with hardware.  Add debugging output and document.
	* ser-e7kpc.c: Swap order of len & offset to match implementation.
	Add debugging output and document.
	* serial.c: Add debugging output.
	* top.c: Add call to do_final_cleanups.
	Remove conditionals preventing Win32 from getting SIGQUIT.
	* utils.c: (*_cleanup): Modify cleanup routines to accept a cleanup
	chain as a parameter.  Extract this generic code from the cleanup
	routines into separate funtions (*_my_cleanup).  Keep old
	functionality by passing "cleanup_chain" to the new funtions.
	Define the cleanup chain "final_cleanup_chain" to be a cleanup
	chain which will be executed only when gdb exits.  Add functions
	(*_final_cleanup) to match the original (*_cleanup) functions.
	(pollquit, quit, notice_quit): Fix to read cntl-C from the
	Windows message queue.
1997-02-12 10:27:11 +00:00
Jeff Law
8bd49d39b3 Remove REG_STRUCT_HAS_ADDR change. 1997-02-12 01:00:46 +00:00
Jeff Law
d601a41faa * config/mn10200/tm-mn10200.h (STORE_STRUCT_RETURN): Fix.
* mn10200-tdep.c (mn10200_store_struct_return): New function.
        (REG_STRUCT_HAS_ADDR): Tweak.
Fixes most of the structs.exp tests.
1997-02-12 00:48:47 +00:00
David Edelsohn
46148567bd * m32r-rom.c: #include <sys/types.h>.
#ifdef out new load support if wingdb.
1997-02-11 23:38:50 +00:00
Jeff Law
527579ee7b * config/mn10200/tm-mn10200.h (EXTRACT_RETURN_VALUE): Fix case when
extracting a return value from a register pair.
Fixes remaining failures in callfuncs.exp, but not structs.exp.
1997-02-11 22:40:54 +00:00
Jeff Law
25de138b06 * mn10200-tdep.c (mn10200_push_arguments): Stack only needs to
be two byte aligned.  Round argument sizes up to two byte boundary.
        Write out args in two byte hunks.
        (mn10200_push_return_address): Implement.
        * config/mn10200/tm-mn10200.h (EXTRACT_RETURN_VALUE): Abort for
        structures > 8 bytes (temporary).
        (STORE_RETURN_VALUE): Likewise.
        (CALL_DUMMY): No longer undefine.
        (USE_STRUCT_CONVENTION): Use for args > 8 bytes.
        (REG_STRUCT_HAS_ADDR): Define.
Inferior function calls for the mn10200.
1997-02-11 19:31:29 +00:00
Gavin Romig-Koch
276c2d7dc8 Add r5900 1997-02-11 13:26:34 +00:00
Mark Alexander
7061bb0ef3 * mips-tdep.c (non_heuristic_proc_desc): New function.
(find_proc_desc): Move non-heuristic proc search code into separate
	function.
	(gdb_print_insn_mips): Use non-heuristic method to find procedure
	descriptor, to avoid prologue examination when disassembling.
	* remote-mips.c: Add support for new "lsi" target (LSI MiniRISC
	aka MicroMeteor board).
	(mips_exit_debug): Prevent protocol reinitialization if an error
	occurs while exiting debug mode.
1997-02-11 02:48:55 +00:00
Jeff Law
a698d0d06f * mn10200-tdep.c: Remove lots of debugging printfs, update/improve
comments, formatting, etc.  Plus other minor fixes for problems
        I found during my first pass over the mn10200 port.
        (mn10200_analyze_prologue): New function.
        (mn10200_frame_chain, mn10200_init_extra_frame_info): Use it.
        * config/mn10200/tm-mn10200.h: Lots of updates/improvements to
        comments, formatting, etc.  Minor fixes for problems I found during
        my first pass over the mn10200 port.
        (TARGET_*_BIT): Define appropriately for ints, long longs, doubles and
        pointers.
        (REGISTER_VIRTUAL_TYPE): Define as a long.
        (EXTRACT_RETURN_VALUE): Rework to deal with long ints living
        in register pairs.
        (STORE_RETURN_VALUE): Similarly.
Checking in my initial changes, prologue scanning, etc.
Current gdb testsuite results:

                === gdb Summary ===

# of expected passes       3684
# of expected failures     40
# of unexpected failures   6
1997-02-10 23:56:56 +00:00
Jeff Law
efaf2b5892 * blockframe.c (generic_get_saved_regs): Remove unused variable
"addr".
        * breakpoint.c (frame_in_dummy): Move struct breakpoint *b decl
        inside #ifdef CALL_DUMMY.
        (watch_command_1): Initialize target_resources_ok.
        * command.c (do_setshow_command): Provide dummy initialization
        for "match".
        * valops.c (find_function_addr): Move function & prototype inside
        #ifdef CALL_DUMMY.
        (value_arg_coerce): Similarly.
        (value_of_variable): Provide dummy initialization of "frame".
Lint.
1997-02-10 23:15:37 +00:00
Stu Grossman
40dffa42ba * gdbtk.c (call_wrapper): Clear running_now if an error occurs.
This fixes PR 11323, where gdbtk stops responding if an error occurs.
1997-02-10 21:52:46 +00:00
Fred Fish
86fdcdafd1 * xcoffread.c (RECORD_MINIMAL_SYMBOL): Add NULL asection* parameter
to prim_record_minimal_symbol_and_info call that was missed in Jan 3
	change.
	(scan_xcoff_symtab): Ditto.
1997-02-10 15:59:01 +00:00
Mark Alexander
32dab60312 * remote-mips.c (common_breakpoint): Prevent 64-bit addresses
from being sent to 32-bit targets by masking off upper bits.
	* mips-tdep.c (heuristic_proc_start): Mask off upper 32 bits
	of PC on 32-bit targets.
	(mips16_heuristic_proc_desc): Recognize 'addiu s1,sp,n' as a
	frame setup instruction.
	(mips32_heuristic_proc_desc): Fix warning found by gcc -Wall.
	(mips16_skip_prologue): Recognize 'addiu s1,sp,n' as a valid
	prologue instruction.  Fix warnings and bugs found by gcc -Wall.
	* buildsym.c (finish_block): Improve handling of overlapping blocks;
	fixes problem on MIPS16 printing function arguments.
1997-02-09 17:36:49 +00:00
Peter Schauer
e7e98487ba * dwarf2read.c (dwarf2_linkage_name): New function to get
the linkage name of a die from DW_AT_MIPS_linkage_name or
	DW_AT_name.
	(read_func_scope, dwarf2_add_field, dwarf2_add_member_fn,
	new_symbol):  Use it instead of accessing DW_AT_name.
	(read_partial_die):  Use DW_AT_MIPS_linkage name as name of the
	partial die if present.
	(dwarf2_add_member_fn):  Make a copy of physname on the type obstack.
1997-02-08 09:16:26 +00:00
Jeff Law
c301abbdbb * blockframe.c (generic_frame_chain_valid): If the new frame
is not INNER_THAN the old frame, then it's not valid.
1997-02-07 17:07:49 +00:00
Mark Alexander
7d9e8fac1a * mips-tdep.c (mips16_get_imm): Fix calculation of extended immediate.
(mips16_heuristic_proc_desc): Recognize jal(x) instruction.
1997-02-04 17:18:56 +00:00
Mark Alexander
b348b9fd0e * mips-tdep.c (mips16_decode_reg_save): Distinguish between
sd and sw instructions correctly.
	(heuristic_proc_start): Add support for MIPS16.
	(mips16_get_imm, mips16_heuristic_proc_desc,
	mips32_heuristic_proc_desc): New helper functions for
	heuristic_proc_desc.
	(heuristic_proc_desc): Rewrite and reorganize to support MIPS16.
	(mips_push_arguments): Don't align small arguments in EABI.
	(mips32_skip_prologue): Attempt to shrink code size a little.
1997-02-04 02:09:33 +00:00
Michael Snyder
fbfa4d54f8 Mon Feb 3 11:06:05 1997 Michael Snyder <msnyder@cleaver.cygnus.com>
* m32r-stub.c: New -- remote protocol support for M32R cpu.
        * m32r-rom.c:  Several experiments with improved download time.
        * .Sanitize:   Add entry for m32r-stub.c
1997-02-03 19:18:32 +00:00
Stan Shebs
bb6debca31 Annual ChangeLog split. 1997-01-31 19:54:14 +00:00
Mark Alexander
20fa0902e7 * mips-tdep.c (MIPS16_INSTLEN): Define.
(mips_find_saved_regs): Replace hardcoded 2's with MIPS16_INSTLEN.
	(heuristic_proc_start): Recognize 'entry' pseudo-op as a start
	of function on MIPS16.
	(mips32_skip_prologue, mips16_skip_prologue): New helper functions
	for mips_skip_prologue.
	(mips_skip_prologue): Recognize both 16- and 32-bit prologues.
1997-01-31 16:37:07 +00:00
Michael Meissner
7e2b3363f1 Remove ../sim/ppc/libsim.a 1997-01-29 17:47:02 +00:00
Michael Snyder
b444216f2c * blockframe.c: fix a null pointer ref in generic_get_saved_register 1997-01-28 23:55:28 +00:00
Geoffrey Noer
52c8eceee0 Tue Jan 28 15:39:50 1997 Geoffrey Noer <noer@cygnus.com>
* mn10200-tdep.c (mn10200_frame_chain): get basic backtracing
        working
1997-01-28 23:43:36 +00:00
Mark Alexander
f9f8c14b1a First set of changes for mips16:
* config/mips/tm-mips.h (MIPS16_BIG_BREAKPOINT,
	MIPS16_LITTLE_BREAKPOINT, BREAKPOINT_FROM_PC): Define.
	(ABOUT_TO_RETURN): Call new function mips_about_to_return.
	(mips_breakpoint_from_pc, mips_about_to_return): Declare.
	* mem-break.c (memory_breakpoint_from_pc): New function.
	(memory_insert_breakpoint, memory_remove_breakpoint): Use
	memory_breakpoint_from_pc to determine breakpoint contents and size.
	* target.h (memory_breakpoint_from_pc): Declare.
	* monitor.c (monitor_insert_breakpoint): Use memory_breakpoint_from_pc
	to determine size of breakpoint instruction.
	* mips-tdep.c (mips32_decode_reg_save, mips16_decode_reg_save):
	New helper functions for mips_find_saved_regs.
	(mips_find_saved_regs): Recognize mips16 prologues.
	(mips_addr_bits_remove): Strip off upper 32 bits of address
	when target CPU is 32 bits but CORE_ADDR is 64 bits.
	(mips_step_skips_delay): No branch delay slot on mips16.
	(gdb_print_insn_mips): Disassemble mips16 code.
	(mips_breakpoint_from_pc, mips_about_to_return): New functions.
1997-01-28 00:50:13 +00:00
Jeff Law
ddc846e915 * tm-mn10200.h (NUM_REGS): Decrease to 12.
(REGISTER_NAMES): Elimination registers not found on the mn10200.
        (PC_REGNUM, MDR_REGNUM, PSW_REGNUM): Corresponding changes.
        (LIR_REGNUM, LAR_REGNUM): Delete.  They don't exist on the mn10200.
1997-01-27 17:36:55 +00:00
Peter Schauer
5499537344 * dwarf2read.c: Replace integral tag, name and form fields in
internal structure definitions with the corresponding enumeration
	types from dwarf2.h. Add default cases to switches on enumerations
	where appropriate.
	Make quoting of string arguments in complaint messages consistent.
	Check for NULL returns from DW_STRING.
	(struct partial_die_info):  Add sibling and has_type fields, remove
	unused value field.
	(DW_*):  Move access macro definitions near the definition of the
	attribute structure.
	(struct field_info):  New structure to pass information about fields
	and member functions between die processing routines.
	(dwarf2_build_psymtabs_hard):  Set cu_header_offset.
	(scan_partial_symbols):  Do not enter DW_TAG_subprogram dies into
	the partial symbol table if the DW_AT_*_pc attributes are missing.
	Add file scope base type definitions to the partial symbol table.
	Skip over child dies if the die has a sibling attribute.
	(add_partial_symbol):  Enter global variables with type attributes
	and without location descriptors into the partial symbol table.
	Store value of DW_TAG_variable dies in the partial symbol table.
	Do not enter global variables into the minimal symbol table.
	Add base type definitions to the partial symbol table.
	(psymtab_to_symtab_1):  Use dwarf2_get_pc_bounds to determine highpc.
	(process_die):  Move check for DW_AT_low_pc to read_func_scope.
	Add a typedef symbol for base type definitions to the symbol table.
	Ignore DW_TAG_inlined_subroutine tags for now.
	(read_file_scope):  Use dwarf2_get_pc_bounds to determine pc bounds.
	(read_func_scope, read_lexical_block_scope):  Use dwarf2_get_pc_bounds
	to determine pc bounds, ignore dies with invalid bounds.
	(dwarf2_get_pc_bounds):  New routine to extract and validate the
	DW_AT_*_pc attributes of a die.
	(dwarf2_add_field, dwarf2_attach_fields_to_type, skip_member_fn_name,
	dwarf2_add_member_fn, dwarf2_attach_fn_fields_to_type):
	New functions to handle fields and member functions.
	(read_structure_scope):  Rewritten to use them.
	(read_array_type):  Renamed from dwarf_read_array_type.
	Default upper array bound to describe an array with unspecified
	length.
	Create array types in backwards order, as dwarf2 puts out the array
	dimensions from left to right.
	(read_subroutine_type):  Handle DW_TAG_unspecified_parameters,
	DW_AT_artificial and DW_AT_prototyped.
	(read_base_type):  Make an unsigned type for DW_ATE_boolean.
	Pass objfile to dwarf_base_type.
	(read_partial_die):  Use read_attribute to read in the attributes.
	Handle DW_AT_sibling and DW_AT_type.
	Follow references when determining DW_AT_name and DW_AT_external
	attributes of the die.
	Validate DW_AT_*_pc attributes.
	(read_full_die):  Use read_attribute to read in the attributes.
	(read_attribute):  New function to read an attribute described
	by an abbreviated attribute.
	(new_symbol):  Relocate symbol value for DW_TAG_label with baseaddr.
	Do not set SYMBOL_VALUE_ADDRESS for DW_TAG_subprogram,
	SYMBOL_BLOCK_VALUE for the symbol will be set later by finish_block.
	Change symbol class for global variables with a zero valued location
	descriptor to LOC_UNRESOLVED.
	Handle DW_AT_const_value attributes for DW_TAG_variable,
	DW_TAG_formal_parameter and DW_TAG_enumerator.
	Build a typedef symbol for DW_TAG_base_type.
	(dwarf2_const_value):  New routine to copy a constant value from an
	attribute to a symbol.
	(dwarf_base_type):  Use passed in objfile, not current_objfile
	when calling dwarf2_fundamental_type.
	(dump_die):  Use DW_* accessor macros to access values of attributes.
	(decode_locdesc):  Handle DW_OP_plus_uconst.
1997-01-25 08:09:53 +00:00
Geoffrey Noer
d9ecb24ce8 Wed Jan 22 01:31:16 1997 Geoffrey Noer <noer@cygnus.com>
Start mn10200 gdb port by adding copies of mn10300
        target-specific files with all instances of mn10300 changed
        to mn10200 to start with.
        * mn10200-tdep.c: new
        * config/mn10200/tm-mn10200.h: new, REGISTER_SIZE is 24 bits not 32,
        SP_REGNUM and FP_REGNUM are different, also no lar or lir.
        * config/mn10200/mn10200.mt: new
        * configure.tgt: add mn10200 entry
1997-01-22 10:38:01 +00:00
Geoffrey Noer
879b939859 Wed Jan 22 01:31:16 1997 Geoffrey Noer <noer@cygnus.com>
Start mn10200 gdb port by adding copies of mn10300
        target-specific files with all instances of mn10300 changed
        to mn10200 to start with.
        * mn10200-tdep.c: new
        * config/mn10200/tm-mn10200.h: new, REGISTER_SIZE is 24 bits not 32,
        SP_REGNUM and FP_REGNUM are different, also no lar or lir.
        * config/mn10200/mn10200.mt: new
1997-01-22 09:41:02 +00:00
Stu Grossman
95b475477e * configure.in configure: Check if host has libdl if doing
Solaris threads.
1997-01-22 02:33:50 +00:00
Geoffrey Noer
95efddf268 Tue Jan 21 17:03:26 1997 Geoffrey Noer <noer@cygnus.com>
* mn10300-tdep.c: wrote/fixed implementations of
        mn10300_frame_chain, mn10300_init_extra_frame_info,
        mn10300_frame_saved_pc
        * config/mn10300/tm-mn10300.h: redefine INIT_EXTRA_FRAME_INFO
        and INIT_FRAME_PC macros
        Backtracing starting to work correctly.
1997-01-22 01:33:58 +00:00
Stu Grossman
ef6c51d13f * configure.in configure: Check if host has libm. Make sure we
are using gcc when using the -export-dynamic option.  Fixes a
	problem with building under Solaris/SunPro cc.
1997-01-22 01:12:19 +00:00
Mark Alexander
f1536ab577 * config/mips/{embed,embed64,embedl,embedl64}.mt:
Link in simulator on MIPS embedded targets.
1997-01-20 22:59:46 +00:00
Peter Schauer
15cb042bc1 * blockframe.c (frameless_look_for_prologue): Mark frames
with a zero PC as frameless to improve backtraces from core dumps
	caused by dereferencing a NULL function pointer.
1997-01-18 10:33:06 +00:00
Geoffrey Noer
1bb1df85cb Thu Jan 16 14:10:41 1997 Geoffrey Noer <noer@cygnus.com>
* config/mn10300/tm-mn10300.h: fix BREAKPOINT definition
1997-01-16 22:14:19 +00:00