mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-23 18:14:13 +08:00
import gdb-1999-12-06 snapshot
This commit is contained in:
parent
1e37c28164
commit
c2d11a7da0
379
gdb/ChangeLog
379
gdb/ChangeLog
@ -1,3 +1,340 @@
|
||||
1999-12-06 Christopher Faylor <cgf@cygnus.com>
|
||||
|
||||
* dcache.c (set_dcache_state): New function.
|
||||
* dcache.h: Declare set_dcache_state().
|
||||
|
||||
Sat Dec 4 15:17:44 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* remote.c (build_remote_packet_sizes): Reduce the default packet
|
||||
size of 400 bytes by one to 399. Stops GDB trashing stubs that
|
||||
append a trailing NUL to an already full buffer.
|
||||
|
||||
Sat Dec 4 01:16:47 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* tracepoint.c (remote_get_noisy_reply): Add parameter sizeof_buf.
|
||||
(finish_tfind_command): Add parameter sizeof_msg.
|
||||
|
||||
* remote.c (remote_threads_info): Move assignment operator to
|
||||
outside of function call.
|
||||
(remote_send): Add parameter sizeof_buf.
|
||||
(getpkt): Add parameter sizeof_buf. Call read_frame passing in
|
||||
sizeof_buf.
|
||||
|
||||
* remote.h (getpkt): Update.
|
||||
|
||||
* tracepoint.c (remote_set_transparent_ranges,
|
||||
remote_get_noisy_reply, trace_start_command, trace_stop_command,
|
||||
trace_status_command, finish_tfind_command, trace_find_pc_command,
|
||||
trace_find_tracepoint_command, trace_find_line_command,
|
||||
trace_find_range_command, trace_find_outside_command): Update.
|
||||
|
||||
* remote.c (set_thread, remote_thread_alive,
|
||||
remote_get_threadinfo, remote_get_threadlist,
|
||||
remote_current_thread, remote_threads_info,
|
||||
extended_remote_restart, get_offsets, remote_open_1,
|
||||
remote_async_open_1, remote_wait, remote_async_wait,
|
||||
remote_fetch_registers, check_binary_download, remote_write_bytes,
|
||||
remote_read_bytes, remote_send, remote_detach,
|
||||
remote_async_detach, remote_fetch_registers,
|
||||
store_register_using_P, store_register_using_P,
|
||||
remote_fetch_registers, remote_store_registers, putpkt_binary,
|
||||
remote_insert_breakpoint, remote_remove_breakpoint,
|
||||
compare_sections_command, remote_rcmd, packet_command,
|
||||
remote_info_process, remote_query, remote_insert_watchpoint,
|
||||
remote_search, remote_remove_watchpoint,
|
||||
remote_insert_hw_breakpoint, remote_remove_hw_breakpoint): Update.
|
||||
|
||||
Fri Dec 3 17:38:06 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* (read_frame): Add sizeof_buf parameter. Don't allow repeat when
|
||||
first character. Always leave space at the end of the buffer.
|
||||
Return size of packet or -1.
|
||||
(getpkt): Update. Pass in PBUFSIZ.
|
||||
|
||||
Thu Dec 2 17:14:53 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* ser-pipe.c: Include <string.h> for memset().
|
||||
|
||||
1999-12-01 Christopher Faylor <cgf@cygnus.com>
|
||||
|
||||
* config/i386/tm-cygwin.h: Change tm-i386.h include back to tm-i386v.h.
|
||||
|
||||
1999-12-01 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* inf-loop.c (inferior_event_handler): In case of
|
||||
INF_EXEC_CONTINUE, don't do all the regular continuations, but
|
||||
just the intermediate ones.
|
||||
|
||||
* infcmd.c (step_once): Add the continuation to the
|
||||
intermediate_continuation list instead of the regular continuation
|
||||
list.
|
||||
|
||||
* utils.c (add_intermediate_continuation): New function, to add
|
||||
continuations to the intermedite_continuation list.
|
||||
(do_all_intermediate_continuations): New function, do all the
|
||||
continuations in the intermediate list.
|
||||
(discard_all_intermediate_continuations): New function, discard
|
||||
all the continuations in the intermediate list.
|
||||
(intermediate_continuation): New global list for use by step_1().
|
||||
|
||||
* defs.h: Export intermediate_continuation,
|
||||
add_intermediate_continuation, do_all_intermediate_continuations,
|
||||
discard_all_intermediate_continuations.
|
||||
|
||||
1999-11-30 Christopher Faylor <cgf@cygnus.com>
|
||||
|
||||
* win32-nat.c (mappings): Reorganize slightly for new uniform i386
|
||||
register configuration.
|
||||
(do_child_fetch_inferior_registers): Handle special case floating point
|
||||
registers.
|
||||
(handle_output_debug_string): Handle cygwin-specific signals broadcast
|
||||
from the cygwin DLL.
|
||||
(handle_exceptions): Add code to properly allow continuation after a
|
||||
CTRL-C.
|
||||
(child_continue): Accept propagated "continue_status" which controls
|
||||
how the inferior should be continued.
|
||||
(get_child_debug_event): New function.
|
||||
(child_wait): Use above function to handle debug events.
|
||||
(child_create_inferior): Add more intelligent method for running the
|
||||
inferior to the appropriate point before handing it off to the rest of
|
||||
gdb.
|
||||
(child_stop): Specifically send a CTRL-C to the debugged process.
|
||||
(child_kill_inferior): Set global continue status here to cause
|
||||
inferior to run to completion.
|
||||
(child_resume): Eliminate code which attempts to decide how to continue
|
||||
the inferior. This is now handled by child_continue.
|
||||
* config/i386/tm-cygwin.h: Gut and reorganize for consistency with new
|
||||
tm-i386.h.
|
||||
|
||||
Patch from Egor Duda (deo@logos-m.ru)
|
||||
* win32-nat.c (psapi_get_dll_name): New function.
|
||||
(handle_load_dll): Correctly load DLL symbol tables after attaching to
|
||||
a running pid.
|
||||
|
||||
1999-11-30 Michael Snyder <msnyder@cleaver.cygnus.com>
|
||||
|
||||
* infrun.c (handle_inferior_pid): revert 11-29 change: resuming
|
||||
a thread other than the current thread with a signal. Apparently
|
||||
target_resume with a specific pid, a specific signal, and no step
|
||||
means to continue ALL threads but to only send the signal to one
|
||||
(and not, as I had assumed, to continue only the specified thread).
|
||||
* i386-linux-nat.c (fill_gregset): guard against invalid input.
|
||||
|
||||
1999-11-30 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* infcmd.c (step_once): New function. Used to do just one step
|
||||
operation.
|
||||
(step_1_continuation): New function. Figure out if we need to step
|
||||
again before returning control to the user.
|
||||
(step_1): If we are in asynchronous mode, don't do the for loop,
|
||||
but rather delegate to continuations the task of repeating the
|
||||
step operation.
|
||||
|
||||
* utils.c (do_all_continuations): Copy the continuation list aside
|
||||
before working on it.
|
||||
|
||||
* target.h (enum inferior_event_type): Add new enum
|
||||
INF_EXEC_CONTINUE.
|
||||
|
||||
* inf-loop.c (inferior_event_handler): Handle new case
|
||||
INF_EXEC_CONTINUE.
|
||||
|
||||
* infrun.c (fetch_inferior_event): If we are in the middle of a
|
||||
'step n' type command, don't say that the execution is complete,
|
||||
but that it will have to continue.
|
||||
|
||||
1999-11-30 Kevin Buettner <kevinb@cygnus.com>
|
||||
|
||||
* utils.c (verror): Don't traverse va_list argument twice. Also,
|
||||
removed extraneous va_end() call.
|
||||
|
||||
1999-11-29 Michael Snyder <msnyder@cleaver.cygnus.com>
|
||||
|
||||
* infrun.c (handle_inferior_pid): If a child thread stops on a
|
||||
signal that we are ignoring, and GDB silently resumes the child,
|
||||
resume ALL threads (not just the one that got the signal). All
|
||||
threads are stopped, so all must be resumed.
|
||||
(handle_inferior_pid): on detecting a thread context switch,
|
||||
swap infrun_state ONLY if both the old thread and the new one
|
||||
are in the thread list. Otherwise state information will be lost!
|
||||
Problem may arise with flaky back-ends.
|
||||
|
||||
1999-11-29 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* breakpoint.c (bpstat_stop_status): Don't decrease hit_count
|
||||
in case of a wp that has not changed.
|
||||
|
||||
Mon Nov 29 12:14:10 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* gdbtypes.c (init_simd_type): Make static.
|
||||
|
||||
* configure.in (AC_CHECK_HEADERS): Check for <sys/ioctl.h>.
|
||||
* configure, config.h: Re-generate.
|
||||
* inflow.c: Include <sys/ioctl.h>
|
||||
|
||||
* i386b-nat.c: Include "gdbcore.h".
|
||||
* fork-child.c: Include "command.h".
|
||||
|
||||
* remote.c (remote_cisco_section_offsets,
|
||||
remote_start_remote_dummy, store_register_using_P,
|
||||
remote_info_process, remote_cisco_open, remote_cisco_close,
|
||||
readsocket, readtty, minitelnet, remote_cisco_wait,
|
||||
init_remote_async_ops, init_extended_async_remote_ops,
|
||||
set_remote_cmd), infrun.c (default_skip_permanent_breakpoint): Use
|
||||
ISO-C syntax for function definition.
|
||||
|
||||
Mon Nov 29 11:28:21 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* stabsread.c: Revert 1999-11-09 Jim Blandy
|
||||
<jimb@zwingli.cygnus.com> and 1999-11-08 Jim Blandy
|
||||
<jimb@zenia.red-bean.com>. Broken on non-Linux targets.
|
||||
|
||||
1999-11-26 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* symfile.c (show_load_progress): Add total sent so far to the
|
||||
information passsed to the hook users.
|
||||
(generic_load): Collect total sent so far and pass that to the
|
||||
progress hook.
|
||||
|
||||
* defs.h (show_load_progress): Update.
|
||||
|
||||
1999-11-25 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* coffread.c (coff_symfile_read): Treat "epoc-pe" targets as "pe"
|
||||
targets.
|
||||
* dbxread.c (dbx_read_symfile): Treat "epoc-pe" targets as "pe"
|
||||
targets.
|
||||
|
||||
Wed Nov 24 17:07:28 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* Makefile.in (init.c): Add SUBDIR_INIT_FILES so that sub
|
||||
directories can hook in extra init files.
|
||||
|
||||
1999-11-23 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* defs.h (show_load_progress): Export.
|
||||
|
||||
* symfile.c (show_load_progress): New hook for download.
|
||||
(generic_load): Collect total size of executable to load.
|
||||
Call progress hook when downloading.
|
||||
|
||||
Thu Nov 18 11:54:24 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* arc-tdep.c (codestream_fill): Rewrite byte swap code using
|
||||
function extract_unsigned_integer.
|
||||
|
||||
Wed Nov 17 17:01:06 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* arm-xdep.c: #include "arm-opcode.h" -> "opcode/arm.h".
|
||||
|
||||
1999-11-22 Jim Blandy <jimb@cygnus.com>
|
||||
|
||||
* Makefile.in (i386-tdep.o): Update list of dependencies.
|
||||
|
||||
1999-11-22 Jim Blandy <jimb@zenia.red-bean.com>
|
||||
|
||||
* config/i386/tm-i386v.h (NUM_REGS, REGISTER_NAMES,
|
||||
REGISTER_BYTES, REGISTER_BYTE, REGISTER_RAW_SIZE,
|
||||
REGISTER_VIRTUAL_SIZE, MAX_REGISTER_RAW_SIZE,
|
||||
MAX_REGISTER_VIRTUAL_SIZE, REGISTER_VIRTUAL_TYPE): Deleted. All
|
||||
of these should inherit identical or compatible values from
|
||||
tm-i386.h, as long as you don't define HAVE_SSE_REGS or
|
||||
HAVE_I387_REGS, which are new anyway.
|
||||
|
||||
Mon Nov 22 21:39:27 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* target.c (do_target_signal_to_host): New function. Indicate of
|
||||
the conversion was successful to the caller via an additional
|
||||
parameter.
|
||||
(target_signal_to_host_p): New function. Return non-zero if the
|
||||
GDB signal exists on the host system.
|
||||
(target_signal_to_host): Rewrite. Use do_target_signal_to_host.
|
||||
* target.h (target_signal_to_host_p): Add declaration. Document
|
||||
target_singal vs host signal vs target OS signal confusion.
|
||||
|
||||
From 1999-11-08 Jimmy Guo <guo@cup.hp.com>:
|
||||
* hppah-nat.c (require_notification_of_events): Start by ignoring
|
||||
all signals and then adding back in ones we're interested in.
|
||||
|
||||
Thu Nov 18 18:12:48 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* jv-typeprint.c (java_type_print_base), kod-cisco.c
|
||||
(cisco_kod_open), kod.c (kod_set_os), xcoffread.c
|
||||
(process_linenos), symfile.c (add_symbol_file_command),
|
||||
remote-rdi.c (arm_rdi_open, rdilogfile_command), main.c
|
||||
(captured_main), go32-nat.c (go32_create_inferior), exec.c
|
||||
(exec_file_attach), corefile.c (core_file_command,
|
||||
reopen_exec_file): Replace strdup with xstrdup.
|
||||
|
||||
Mon Nov 22 12:02:47 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* bcache.c (print_bcache_statistics): Fix printf_filtered
|
||||
arguments.
|
||||
(print_percentage): Make function void.
|
||||
|
||||
1999-11-21 Jim Blandy <jimb@zenia.red-bean.com>
|
||||
|
||||
Make the bcache hash table grow.
|
||||
* bcache.h (BCACHE_NUM_BUCKETS): Delete definition.
|
||||
(struct bcache): Add new element: num_buckets. Make bucket be a
|
||||
pointer to an array, not an array.
|
||||
(free_bcache): New extern declaration.
|
||||
* bcache.c (CHAIN_LENGTH_THRESHOLD): New constant.
|
||||
(expand_hash_table): New function.
|
||||
(bcache): Grow the hash table if the average chain length reaches
|
||||
CHAIN_LENGTH_THRESHOLD.
|
||||
(free_bcache): New function.
|
||||
(print_bcache_statistics): Don't assume that the number of buckets
|
||||
is constant any more.
|
||||
(BSTRING_SIZE): Moved down to just above 'bcache' function, where
|
||||
it's used.
|
||||
* objfiles.c (free_objfile): Call free_bcache, instead of just
|
||||
freeing the bcache's obstack directly.
|
||||
* symfile.c (reread_symbols): Same.
|
||||
|
||||
1999-11-20 Jim Blandy <jimb@zenia.red-bean.com>
|
||||
|
||||
* bcache.c, bcache.h: Rewritten. New version imposes less memory
|
||||
overhead, and has a more effective hash function, so it's probably
|
||||
faster, too.
|
||||
|
||||
* config/nm-linux.h: No need to check whether __STDC__ is
|
||||
#defined --- GDB requires ANSI C now.
|
||||
|
||||
* config/i386/nm-linux.h (linuxthreads_pid_to_str,
|
||||
linuxthreads_prepare_to_proceed): Delete declarations --- they're
|
||||
provided by config/nm-linux.h now.
|
||||
|
||||
1999-11-19 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* top.c (print_command_lines): Remove unused var.
|
||||
|
||||
1999-11-19 Jim Kingdon <kingdon@redhat.com>
|
||||
|
||||
Patch applied by Jim Blandy <jimb@cygnus.com>:
|
||||
|
||||
Enable threads for all linux architectures:
|
||||
* config/nm-linux.h: New file.
|
||||
config/alpha/nm-linux.h, config/i386/nm-linux.h,
|
||||
config/m68k/nm-linux.h, config/sparc/nm-linux.h: Use it.
|
||||
* config/tm-linux.h: New file.
|
||||
* config/i386/tm-linux.h, config/m68k/tm-linux.h,
|
||||
config/sparc/tm-linux.h, config/alpha/tm-alphalinux.h: Use it.
|
||||
* config/m68k/linux.mh, config/sparc/linux.mh,
|
||||
config/alpha/alpha-linux.mh: Add linux-thread.o.
|
||||
|
||||
1999-11-18 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* tracepoint.h (get_tracepoint_by_number): Updated declaration.
|
||||
* tracepoint.c (trace_pass_command): Better error message. Fixed
|
||||
logic when `all' not specified.
|
||||
(get_tracepoint_by_number): Added `optional_p' argument. Fixed
|
||||
all callers.
|
||||
|
||||
Wed Nov 17 17:40:30 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* findvar.c (SWAP_FLOATING): Delete macro. Unused.
|
||||
|
||||
1999-11-16 Mark Salter <msalter@cygnus.com>
|
||||
|
||||
* monitor.c (monitor_supply_register): Initialize value to zero.
|
||||
@ -4885,6 +5222,7 @@ Mon Jun 7 21:08:50 1999 Andrew Cagney <cagney@amy.cygnus.com>
|
||||
|
||||
* config/mips/tm-mips.h (mips_init_extra_frame_info), mips-tdep.c:
|
||||
Rename init_extra_frame_info. Add argument ``fromleaf''.
|
||||
mips-tdep.c (mips_gdbarch_init): Add mips_init_extra_frame_info.
|
||||
|
||||
* config/mips/tm-mips.h (mips_print_extra_frame_info),
|
||||
mips-tdep.c: New function.
|
||||
@ -4902,6 +5240,7 @@ Mon Jun 7 20:11:07 1999 Andrew Cagney <cagney@amy.cygnus.com>
|
||||
(mips_register_name): New function.
|
||||
(mips_set_processor_type): Update mips_processor_reg_names.
|
||||
(mips_generic_reg_names): Initialize using MIPS_REGISTER_NAMES.
|
||||
(mips_gdbarch_init): Add mips_register_name.
|
||||
|
||||
Sun Jun 6 11:09:19 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
@ -5993,6 +6332,15 @@ Fri Apr 16 15:39:10 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
HAVE_NONSTEPPABLE_WATCHPOINT, HAVE_CONTINUABLE_WATCHPOINT]: Test
|
||||
at runtime instead of compile time.
|
||||
|
||||
Thu Apr 15 15:15:07 1999 Andrew Cagney <cagney@amy.cygnus.com>
|
||||
|
||||
* mips-tdep.c (struct gdbarch_tdep): Rename elf_abi to
|
||||
elf_flags. Check ABFD is elf_flavour before extracting elf_flags.
|
||||
Match ARCH against entire elf_flags instead of just the
|
||||
EF_MIPS_ABI field.
|
||||
(mips_gdbarch_init): Extract/print ef_mips_arch and
|
||||
ef_mips_bitptrs and ef_mips_abi fields from elf_flags.
|
||||
|
||||
1999-04-14 Philippe De Muyter <phdm@macqel.be>
|
||||
|
||||
* breakpoint.c (maintenance_info_breakpoints): Function made
|
||||
@ -6357,6 +6705,8 @@ Thu Mar 25 19:30:02 1999 Andrew Cagney <cagney@amy.cygnus.com>
|
||||
pc_in_call_dummy_at_entry_point): Convert PC_IN_CALL_DUMMY macro's
|
||||
into functions.
|
||||
|
||||
* mips-tdep.c (mips_gdbarch_init): Initialize above
|
||||
|
||||
Tue Mar 23 17:22:57 1999 Philippe De Muyter <phdm@macqel.be>
|
||||
|
||||
* remote.c, parse.c: Include ctype.h.
|
||||
@ -6989,6 +7339,28 @@ Fri Jan 29 16:51:11 1999 Andrew Cagney <cagney@chook.cygnus.com>
|
||||
return_value_location. For store, ensure that remainder of
|
||||
register is zero.
|
||||
|
||||
Thu Jan 28 18:58:02 1999 Andrew Cagney <cagney@chook.cygnus.com>
|
||||
|
||||
From John Metzler <jmetzler@cygnus.com>:
|
||||
* mips-tdep.c (struct gdbarch_tdep): Add mips_saved_regsize.
|
||||
(MIPS_SAVED_REGSIZE): Define.
|
||||
(mips_find_saved_regs, read_next_frame_reg, mips_pop_frame):
|
||||
Read/write MIPS_SAVED_REGSIZE bytes of register on stack instead
|
||||
of MIPS_REGSIZE.
|
||||
(mips_gdbarch_init): Initialize mips_saved_regsize.
|
||||
|
||||
* mips-tdep.c (mips_frame_saved_pc, mips16_heuristic_proc_desc,
|
||||
mips_push_arguments, mips_push_dummy_frame,
|
||||
mips_use_struct_convention): Ditto. For MIPS_SAVED_REGSIZE <
|
||||
REGISTER_RAW_SIZE, handle little/big endian issues from only using
|
||||
half the register.
|
||||
(STACK_ARGSIZE): Default to MIPS_SAVED_REGSIZE instead of
|
||||
MIPS_REGSIZE.
|
||||
|
||||
* mips-tdep.c (struct gdbarch_tdep, FP_REGISTER_DOUBLE,
|
||||
mips_gdbarch_init): Apply similar changes. Add
|
||||
mips_fp_register_double to struct.
|
||||
|
||||
Wed Feb 17 10:10:27 1999 Stu Grossman <grossman@babylon-5.cygnus.com>
|
||||
|
||||
* gdbtypes.h (get_discrete_bounds): Remove duplicate decl.
|
||||
@ -7358,6 +7730,11 @@ Wed Jan 27 13:20:25 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* hp-psymtab-read.c: Reformat comments, update copyright.
|
||||
|
||||
Wed Jan 27 15:09:22 1999 Andrew Cagney <cagney@chook.cygnus.com>
|
||||
|
||||
* mips-tdep.c (mips_gdbarch_init): Trace e_flags from BFD
|
||||
elf_info.
|
||||
|
||||
Tue Jan 26 16:02:47 1999 Mark Alexander <marka@cygnus.com>
|
||||
|
||||
* v850-tdep.c (v850_generic_reg_names, v850e_reg_names,
|
||||
@ -7614,6 +7991,8 @@ Fri Jan 15 17:11:48 EST 1999 Zdenek Radouch (radouch@cygnus.com)
|
||||
|
||||
Thu Jan 14 18:29:17 1999 David Taylor <taylor@texas.cygnus.com>
|
||||
|
||||
* mips-tdep.c (mips_gdbarch_init): fix stream arg in
|
||||
fprintf_unfiltered calls.
|
||||
* remote-mm.c (mm_wait): fix stream arg to gdb_flush.
|
||||
* remote-udi.c (udi_wait): fix stream arg to fwrite.
|
||||
* symmisc.c (maintenance_check_symtabs): fix stream argument to
|
||||
|
@ -3354,6 +3354,10 @@ Fri Dec 18 14:23:34 1998 Andrew Cagney <cagney@chook>
|
||||
functions, handle commands.
|
||||
(mips_push_arguments, mips_push_dummy_frame, mips_pop_frame,
|
||||
mips_extract_return_value): Update.
|
||||
(_initialize_mips_tdep): Set mips_fpu_type according to current
|
||||
processor.
|
||||
(_initialize_mips_tdep): Only define ``set processor'' command
|
||||
when not multi-sim.
|
||||
|
||||
Fri Dec 18 12:56:56 1998 Andrew Cagney <cagney@chook>
|
||||
|
||||
@ -3361,6 +3365,7 @@ Fri Dec 18 12:56:56 1998 Andrew Cagney <cagney@chook>
|
||||
by-value.
|
||||
(struct gdbarch_info): Add struct gdbarch_tdep_info *tdep_info.
|
||||
* gdbarch.c (gdbarch_update): Update.
|
||||
* mips-tdep.c: (mips_gdbarch_init): Update
|
||||
|
||||
* gdbarch.c (gdbarch_update): Add more tracing.
|
||||
|
||||
@ -3368,7 +3373,18 @@ Thu Dec 17 02:15:40 1998 Andrew Cagney <cagney@chook.cygnus.com>
|
||||
|
||||
* configure.tgt (gdb_target): Identify mips64*vr4100*-*-elf* as
|
||||
vr4100.
|
||||
* config/mips/vr4100.mt, config/mips/tm-vr4100.h: Replace
|
||||
vr4xxx.mt and tm-vr4xxx.h.
|
||||
|
||||
Thu Dec 17 02:06:17 1998 Andrew Cagney <cagney@chook.cygnus.com>
|
||||
|
||||
* mips-tdep.c (mips_gdbarch_init): New function. Initialize a MIPS
|
||||
architecture vector.
|
||||
(_initialize_mips_tdep): Register MIPS with GDBARCH.
|
||||
(struct gdbarch_tdep): Define.
|
||||
(MIPS_EABI, MIPS_LAST_FP_ARG_REGNUM, MIPS_LAST_ARG_REGNUM): When
|
||||
multi-arch, get value from gdbarch->tdep.
|
||||
|
||||
Thu Dec 17 02:01:58 1998 Andrew Cagney <cagney@chook>
|
||||
|
||||
* gdbtypes.c (_initialize_gdbtypes): Register all builtin types
|
||||
@ -4933,6 +4949,13 @@ Thu Jul 30 13:53:50 1998 Mark Alexander <marka@cygnus.com>
|
||||
* symfile.c (add_symbol_file_command): Test for the from_tty
|
||||
parameter and avoid query when not interactive.
|
||||
|
||||
Wed Jul 29 10:39:29 1998 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* mn10300-tdep.c (set_movm_offsets): Do nothing for the am33
|
||||
registers if we are not in am33 mode.
|
||||
(mn10300_frame_chain, mn10300_frame_saved_pc): Similarly.
|
||||
(set_machine_hook): Keep track of whether or not we're in am33 mode.
|
||||
|
||||
Mon Jul 27 16:11:42 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
|
||||
|
||||
* tracepoint.c (remote_set_transparent_ranges): new function.
|
||||
@ -4959,6 +4982,12 @@ Mon Jul 27 10:45:56 1998 Martin M. Hunt <hunt@cygnus.com>
|
||||
stack pointer et al are synthesized from the SP_REGNUM (etc)
|
||||
defines and should not be mentioned in REGISTER_NAMES.
|
||||
|
||||
Mon Jul 27 08:54:41 1998 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* mn10300-tdep.c (mn10300_frame_chain): Account for space saved
|
||||
by am33 register saves.
|
||||
(mn10300_frame_saved_pc): Similarly.
|
||||
|
||||
Fri Jul 24 14:41:19 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
|
||||
|
||||
* tracepoint.c (encode_actions): Treat register names and simple
|
||||
@ -5062,6 +5091,9 @@ Thu Jul 9 16:16:47 1998 Jeffrey A Law (law@cygnus.com)
|
||||
* tm-mn10300 (NUM_REGS): Bump to 32.
|
||||
(REGISTER_NAMES): Updated accordingly.
|
||||
|
||||
* mn10300-tdep.c (am33_register_names): New variable.
|
||||
(mn10300_analyze_prologue): Handle regs saved by am33 prologues.
|
||||
* tm-mn10300.h (E0_REGNUM): Define.
|
||||
|
||||
Tue Jul 7 7:40:13 1998 Ron Unrau <runrau@cygnus.com>
|
||||
|
||||
|
@ -229,7 +229,7 @@ CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \
|
||||
ADD_FILES = $(REGEX) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
|
||||
ADD_DEPS = $(REGEX1) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
|
||||
|
||||
VERSION = 19991116
|
||||
VERSION = 19991206
|
||||
DIST=gdb
|
||||
|
||||
LINT=/usr/5bin/lint
|
||||
@ -624,10 +624,11 @@ uninstall: force
|
||||
# of the functions might change, so this files needs to depend on all the
|
||||
# object files that will be linked into gdb.
|
||||
|
||||
init.c: $(OBS) $(TSOBS)
|
||||
INIT_FILES = $(OBS) $(TSOBS) $(SUBDIR_INIT_FILES)
|
||||
init.c: $(INIT_FILES)
|
||||
@echo Making init.c
|
||||
@rm -f init.c-tmp init.l-tmp
|
||||
@-echo $(OBS) $(TSOBS) | \
|
||||
@-echo $(INIT_FILES) | \
|
||||
tr ' ' '\012' | \
|
||||
sed -e '/^Onindy.o/d' \
|
||||
-e '/^init.o/d' \
|
||||
@ -1195,8 +1196,9 @@ hppah-nat.o: hppah-nat.c $(bfd_h) $(defs_h) $(inferior_h) target.h
|
||||
|
||||
i386gnu-nat.o: gnu-nat.h
|
||||
|
||||
i386-tdep.o: i386-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) target.h \
|
||||
gdb_string.h
|
||||
i386-tdep.o: i386-tdep.c $(defs_h) gdb_string.h $(frame_h) \
|
||||
$(inferior_h) $(gdbcore_h) target.h $(floatformat_h) \
|
||||
$(symtab_h) $(gdbcmd_h) $(command_h)
|
||||
|
||||
i386aix-nat.o: i386aix-nat.c $(defs_h) $(frame_h) $(inferior_h) \
|
||||
language.h $(gdbcore_h) $(floatformat_h) target.h
|
||||
|
@ -97,6 +97,7 @@ static unsigned int codestream_fill PARAMS ((int));
|
||||
#define CODESTREAM_BUFSIZ 16
|
||||
static CORE_ADDR codestream_next_addr;
|
||||
static CORE_ADDR codestream_addr;
|
||||
/* FIXME assumes sizeof (int) == 32? */
|
||||
static unsigned int codestream_buf[CODESTREAM_BUFSIZ];
|
||||
static int codestream_off;
|
||||
static int codestream_cnt;
|
||||
@ -124,16 +125,15 @@ codestream_fill (peek_flag)
|
||||
CODESTREAM_BUFSIZ * sizeof (codestream_buf[0]));
|
||||
/* FIXME: check return code? */
|
||||
|
||||
/* Handle byte order differences. */
|
||||
if (HOST_BYTE_ORDER != TARGET_BYTE_ORDER)
|
||||
{
|
||||
register unsigned int i, j, n = sizeof (codestream_buf[0]);
|
||||
register char tmp, *p;
|
||||
for (i = 0, p = (char *) codestream_buf; i < CODESTREAM_BUFSIZ;
|
||||
++i, p += n)
|
||||
for (j = 0; j < n / 2; ++j)
|
||||
tmp = p[j], p[j] = p[n - 1 - j], p[n - 1 - j] = tmp;
|
||||
}
|
||||
|
||||
/* Handle byte order differences -> convert to host byte ordering. */
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < CODESTREAM_BUFSIZ; i++)
|
||||
codestream_buf[i] =
|
||||
extract_unsigned_integer (&codestream_buf[i],
|
||||
sizeof (codestream_buf[i]));
|
||||
}
|
||||
|
||||
if (peek_flag)
|
||||
return codestream_peek ();
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "defs.h"
|
||||
#include "frame.h"
|
||||
#include "inferior.h"
|
||||
#include "arm-opcode.h"
|
||||
#include "opcode/arm.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/dir.h>
|
||||
|
431
gdb/bcache.c
431
gdb/bcache.c
@ -1,6 +1,7 @@
|
||||
/* Implement a cached obstack.
|
||||
Written by Fred Fish (fnf@cygnus.com)
|
||||
Copyright 1995, 1998 Free Software Foundation, Inc.
|
||||
Written by Fred Fish <fnf@cygnus.com>
|
||||
Rewritten by Jim Blandy <jimb@cygnus.com>
|
||||
Copyright 1999 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
@ -19,198 +20,290 @@
|
||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "defs.h"
|
||||
#include "obstack.h"
|
||||
#include "bcache.h"
|
||||
#include "gdb_string.h" /* For memcpy declaration */
|
||||
|
||||
/* Prototypes for local functions. */
|
||||
|
||||
static unsigned int hash PARAMS ((void *, int));
|
||||
|
||||
/* The hash function. */
|
||||
|
||||
static void *lookup_cache PARAMS ((void *, int, int, struct bcache *));
|
||||
|
||||
/* FIXME: Incredibly simplistic hash generator. Probably way too expensive
|
||||
(consider long strings) and unlikely to have good distribution across hash
|
||||
values for typical input. */
|
||||
|
||||
static unsigned int
|
||||
hash (bytes, count)
|
||||
void *bytes;
|
||||
int count;
|
||||
unsigned long
|
||||
hash (void *addr, int length)
|
||||
{
|
||||
unsigned int len;
|
||||
unsigned long hashval;
|
||||
unsigned int c;
|
||||
const unsigned char *data = bytes;
|
||||
|
||||
hashval = 0;
|
||||
len = 0;
|
||||
while (count-- > 0)
|
||||
/* If it's a short string, hash on every character. Otherwise, sample
|
||||
characters from throughout the string. */
|
||||
if (length <= 64)
|
||||
{
|
||||
c = *data++;
|
||||
hashval += c + (c << 17);
|
||||
hashval ^= hashval >> 2;
|
||||
++len;
|
||||
char *byte = addr;
|
||||
unsigned long h = 0;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < length; i++)
|
||||
h = h * 65793 ^ (h >> (sizeof (h) * 8 - 6)) ^ byte[i];
|
||||
|
||||
return h;
|
||||
}
|
||||
else
|
||||
{
|
||||
char *byte = addr;
|
||||
int n, i;
|
||||
unsigned long h = 0;
|
||||
|
||||
for (n = i = 0; n < 64; n++)
|
||||
{
|
||||
h = h * 65793 + (h >> (sizeof (h) * 8 - 6)) + byte[i];
|
||||
i = h % length;
|
||||
}
|
||||
|
||||
return h;
|
||||
}
|
||||
hashval += len + (len << 17);
|
||||
hashval ^= hashval >> 2;
|
||||
return (hashval % BCACHE_HASHSIZE);
|
||||
}
|
||||
|
||||
static void *
|
||||
lookup_cache (bytes, count, hashval, bcachep)
|
||||
void *bytes;
|
||||
int count;
|
||||
int hashval;
|
||||
struct bcache *bcachep;
|
||||
{
|
||||
void *location = NULL;
|
||||
struct hashlink **hashtablep;
|
||||
struct hashlink *linkp;
|
||||
|
||||
/* Growing the bcache's hash table. */
|
||||
|
||||
hashtablep = bcachep->indextable[count];
|
||||
if (hashtablep != NULL)
|
||||
/* If the average chain length grows beyond this, then we want to
|
||||
resize our hash table. */
|
||||
#define CHAIN_LENGTH_THRESHOLD (5)
|
||||
|
||||
static void
|
||||
expand_hash_table (struct bcache *bcache)
|
||||
{
|
||||
/* A table of good hash table sizes. Whenever we grow, we pick the
|
||||
next larger size from this table. sizes[i] is close to 1 << (i+10),
|
||||
so we roughly double the table size each time. After we fall off
|
||||
the end of this table, we just double. Don't laugh --- there have
|
||||
been executables sighted with a gigabyte of debug info. */
|
||||
static unsigned long sizes[] = {
|
||||
1021, 2053, 4099, 8191, 16381, 32771,
|
||||
65537, 131071, 262144, 524287, 1048573, 2097143,
|
||||
4194301, 8388617, 16777213, 33554467, 67108859, 134217757,
|
||||
268435459, 536870923, 1073741827, 2147483659UL
|
||||
};
|
||||
int new_num_buckets;
|
||||
struct bstring **new_buckets;
|
||||
int i;
|
||||
|
||||
/* Find the next size. */
|
||||
for (i = 0; i < (sizeof (sizes) / sizeof (sizes[0])); i++)
|
||||
if (sizes[i] > bcache->num_buckets)
|
||||
{
|
||||
new_num_buckets = sizes[i];
|
||||
break;
|
||||
}
|
||||
if (i >= (sizeof (sizes) / sizeof (sizes[0])))
|
||||
new_num_buckets = bcache->num_buckets * 2;
|
||||
|
||||
/* Allocate the new table. */
|
||||
{
|
||||
size_t new_size = new_num_buckets * sizeof (new_buckets[0]);
|
||||
new_buckets = (struct bstring **) xmalloc (new_size);
|
||||
memset (new_buckets, 0, new_size);
|
||||
|
||||
bcache->structure_size -= (bcache->num_buckets
|
||||
* sizeof (bcache->bucket[0]));
|
||||
bcache->structure_size += new_size;
|
||||
}
|
||||
|
||||
/* Rehash all existing strings. */
|
||||
for (i = 0; i < bcache->num_buckets; i++)
|
||||
{
|
||||
linkp = hashtablep[hashval];
|
||||
while (linkp != NULL)
|
||||
struct bstring *s, *next;
|
||||
|
||||
for (s = bcache->bucket[i]; s; s = next)
|
||||
{
|
||||
if (memcmp (BCACHE_DATA (linkp), bytes, count) == 0)
|
||||
{
|
||||
location = BCACHE_DATA (linkp);
|
||||
break;
|
||||
}
|
||||
linkp = linkp->next;
|
||||
struct bstring **new_bucket;
|
||||
next = s->next;
|
||||
|
||||
new_bucket = &new_buckets[(hash (&s->d.data, s->length)
|
||||
% new_num_buckets)];
|
||||
s->next = *new_bucket;
|
||||
*new_bucket = s;
|
||||
}
|
||||
}
|
||||
return (location);
|
||||
|
||||
/* Plug in the new table. */
|
||||
if (bcache->bucket)
|
||||
free (bcache->bucket);
|
||||
bcache->bucket = new_buckets;
|
||||
bcache->num_buckets = new_num_buckets;
|
||||
}
|
||||
|
||||
|
||||
/* Looking up things in the bcache. */
|
||||
|
||||
/* The number of bytes needed to allocate a struct bstring whose data
|
||||
is N bytes long. */
|
||||
#define BSTRING_SIZE(n) (offsetof (struct bstring, d.data) + (n))
|
||||
|
||||
/* Find a copy of the LENGTH bytes at ADDR in BCACHE. If BCACHE has
|
||||
never seen those bytes before, add a copy of them to BCACHE. In
|
||||
either case, return a pointer to BCACHE's copy of that string. */
|
||||
void *
|
||||
bcache (bytes, count, bcachep)
|
||||
void *bytes;
|
||||
int count;
|
||||
struct bcache *bcachep;
|
||||
bcache (void *addr, int length, struct bcache *bcache)
|
||||
{
|
||||
int hashval;
|
||||
void *location;
|
||||
struct hashlink *newlink;
|
||||
struct hashlink **linkpp;
|
||||
struct hashlink ***hashtablepp;
|
||||
int hash_index;
|
||||
struct bstring *s;
|
||||
|
||||
if (count >= BCACHE_MAXLENGTH)
|
||||
{
|
||||
/* Rare enough to just stash unique copies */
|
||||
location = (void *) obstack_alloc (&bcachep->cache, count);
|
||||
bcachep->cache_bytes += count;
|
||||
memcpy (location, bytes, count);
|
||||
bcachep->bcache_overflows++;
|
||||
}
|
||||
else
|
||||
{
|
||||
hashval = hash (bytes, count);
|
||||
location = lookup_cache (bytes, count, hashval, bcachep);
|
||||
if (location != NULL)
|
||||
{
|
||||
bcachep->cache_savings += count;
|
||||
bcachep->cache_hits++;
|
||||
}
|
||||
else
|
||||
{
|
||||
bcachep->cache_misses++;
|
||||
hashtablepp = &bcachep->indextable[count];
|
||||
if (*hashtablepp == NULL)
|
||||
{
|
||||
*hashtablepp = (struct hashlink **)
|
||||
obstack_alloc (&bcachep->cache, BCACHE_HASHSIZE * sizeof (struct hashlink *));
|
||||
bcachep->cache_bytes += BCACHE_HASHSIZE * sizeof (struct hashlink *);
|
||||
memset (*hashtablepp, 0, BCACHE_HASHSIZE * sizeof (struct hashlink *));
|
||||
}
|
||||
linkpp = &(*hashtablepp)[hashval];
|
||||
newlink = (struct hashlink *)
|
||||
obstack_alloc (&bcachep->cache, BCACHE_DATA_ALIGNMENT + count);
|
||||
bcachep->cache_bytes += BCACHE_DATA_ALIGNMENT + count;
|
||||
memcpy (BCACHE_DATA (newlink), bytes, count);
|
||||
newlink->next = *linkpp;
|
||||
*linkpp = newlink;
|
||||
location = BCACHE_DATA (newlink);
|
||||
}
|
||||
}
|
||||
return (location);
|
||||
/* If our average chain length is too high, expand the hash table. */
|
||||
if (bcache->unique_count >= bcache->num_buckets * CHAIN_LENGTH_THRESHOLD)
|
||||
expand_hash_table (bcache);
|
||||
|
||||
bcache->total_count++;
|
||||
bcache->total_size += length;
|
||||
|
||||
hash_index = hash (addr, length) % bcache->num_buckets;
|
||||
|
||||
/* Search the hash bucket for a string identical to the caller's. */
|
||||
for (s = bcache->bucket[hash_index]; s; s = s->next)
|
||||
if (s->length == length
|
||||
&& ! memcmp (&s->d.data, addr, length))
|
||||
return &s->d.data;
|
||||
|
||||
/* The user's string isn't in the list. Insert it after *ps. */
|
||||
{
|
||||
struct bstring *new
|
||||
= obstack_alloc (&bcache->cache, BSTRING_SIZE (length));
|
||||
memcpy (&new->d.data, addr, length);
|
||||
new->length = length;
|
||||
new->next = bcache->bucket[hash_index];
|
||||
bcache->bucket[hash_index] = new;
|
||||
|
||||
bcache->unique_count++;
|
||||
bcache->unique_size += length;
|
||||
bcache->structure_size += BSTRING_SIZE (length);
|
||||
|
||||
return &new->d.data;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Freeing bcaches. */
|
||||
|
||||
/* Free all the storage associated with BCACHE. */
|
||||
void
|
||||
print_bcache_statistics (bcachep, id)
|
||||
struct bcache *bcachep;
|
||||
char *id;
|
||||
free_bcache (struct bcache *bcache)
|
||||
{
|
||||
struct hashlink **hashtablep;
|
||||
struct hashlink *linkp;
|
||||
int tidx, tcount, hidx, hcount, lcount, lmax, temp, lmaxt, lmaxh;
|
||||
obstack_free (&bcache->cache, 0);
|
||||
free (bcache->bucket);
|
||||
|
||||
for (lmax = lcount = tcount = hcount = tidx = 0; tidx < BCACHE_MAXLENGTH; tidx++)
|
||||
{
|
||||
hashtablep = bcachep->indextable[tidx];
|
||||
if (hashtablep != NULL)
|
||||
{
|
||||
tcount++;
|
||||
for (hidx = 0; hidx < BCACHE_HASHSIZE; hidx++)
|
||||
{
|
||||
linkp = hashtablep[hidx];
|
||||
if (linkp != NULL)
|
||||
{
|
||||
hcount++;
|
||||
for (temp = 0; linkp != NULL; linkp = linkp->next)
|
||||
{
|
||||
lcount++;
|
||||
temp++;
|
||||
}
|
||||
if (temp > lmax)
|
||||
{
|
||||
lmax = temp;
|
||||
lmaxt = tidx;
|
||||
lmaxh = hidx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
printf_filtered (" Cached '%s' statistics:\n", id);
|
||||
printf_filtered (" Cache hits: %d\n", bcachep->cache_hits);
|
||||
printf_filtered (" Cache misses: %d\n", bcachep->cache_misses);
|
||||
printf_filtered (" Cache hit ratio: ");
|
||||
if (bcachep->cache_hits + bcachep->cache_misses > 0)
|
||||
{
|
||||
printf_filtered ("%d%%\n", ((bcachep->cache_hits) * 100) /
|
||||
(bcachep->cache_hits + bcachep->cache_misses));
|
||||
}
|
||||
else
|
||||
{
|
||||
printf_filtered ("(not applicable)\n");
|
||||
}
|
||||
printf_filtered (" Space used for caching: %d\n", bcachep->cache_bytes);
|
||||
printf_filtered (" Space saved by cache hits: %d\n", bcachep->cache_savings);
|
||||
printf_filtered (" Number of bcache overflows: %d\n", bcachep->bcache_overflows);
|
||||
printf_filtered (" Number of index buckets used: %d\n", tcount);
|
||||
printf_filtered (" Number of hash table buckets used: %d\n", hcount);
|
||||
printf_filtered (" Number of chained items: %d\n", lcount);
|
||||
printf_filtered (" Average hash table population: ");
|
||||
if (tcount > 0)
|
||||
{
|
||||
printf_filtered ("%d%%\n", (hcount * 100) / (tcount * BCACHE_HASHSIZE));
|
||||
}
|
||||
else
|
||||
{
|
||||
printf_filtered ("(not applicable)\n");
|
||||
}
|
||||
printf_filtered (" Average chain length ");
|
||||
if (hcount > 0)
|
||||
{
|
||||
printf_filtered ("%d\n", lcount / hcount);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf_filtered ("(not applicable)\n");
|
||||
}
|
||||
printf_filtered (" Maximum chain length %d at %d:%d\n", lmax, lmaxt, lmaxh);
|
||||
/* This isn't necessary, but at least the bcache is always in a
|
||||
consistent state. */
|
||||
memset (bcache, 0, sizeof (*bcache));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Printing statistics. */
|
||||
|
||||
static int
|
||||
compare_ints (const void *ap, const void *bp)
|
||||
{
|
||||
/* Because we know we're comparing two ints which are positive,
|
||||
there's no danger of overflow here. */
|
||||
return * (int *) ap - * (int *) bp;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
print_percentage (int portion, int total)
|
||||
{
|
||||
if (total == 0)
|
||||
printf_filtered ("(not applicable)\n");
|
||||
else
|
||||
printf_filtered ("%3d%%\n", portion * 100 / total);
|
||||
}
|
||||
|
||||
|
||||
/* Print statistics on BCACHE's memory usage and efficacity at
|
||||
eliminating duplication. NAME should describe the kind of data
|
||||
BCACHE holds. Statistics are printed using `printf_filtered' and
|
||||
its ilk. */
|
||||
void
|
||||
print_bcache_statistics (struct bcache *c, char *type)
|
||||
{
|
||||
int occupied_buckets;
|
||||
int max_chain_length;
|
||||
int median_chain_length;
|
||||
|
||||
/* Count the number of occupied buckets, and measure chain lengths. */
|
||||
{
|
||||
int b;
|
||||
int *chain_length
|
||||
= (int *) alloca (c->num_buckets * sizeof (*chain_length));
|
||||
|
||||
occupied_buckets = 0;
|
||||
|
||||
for (b = 0; b < c->num_buckets; b++)
|
||||
{
|
||||
struct bstring *s = c->bucket[b];
|
||||
|
||||
chain_length[b] = 0;
|
||||
|
||||
if (s)
|
||||
{
|
||||
occupied_buckets++;
|
||||
|
||||
while (s)
|
||||
{
|
||||
chain_length[b]++;
|
||||
s = s->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* To compute the median, we need the set of chain lengths sorted. */
|
||||
qsort (chain_length, c->num_buckets, sizeof (chain_length[0]),
|
||||
compare_ints);
|
||||
|
||||
if (c->num_buckets > 0)
|
||||
{
|
||||
max_chain_length = chain_length[c->num_buckets - 1];
|
||||
median_chain_length = chain_length[c->num_buckets / 2];
|
||||
}
|
||||
else
|
||||
{
|
||||
max_chain_length = 0;
|
||||
median_chain_length = 0;
|
||||
}
|
||||
}
|
||||
|
||||
printf_filtered (" Cached '%s' statistics:\n", type);
|
||||
printf_filtered (" Total object count: %ld\n", c->total_count);
|
||||
printf_filtered (" Unique object count: %ld\n", c->unique_count);
|
||||
printf_filtered (" Percentage of duplicates, by count: ");
|
||||
print_percentage (c->total_count - c->unique_count, c->total_count);
|
||||
printf_filtered ("\n");
|
||||
|
||||
printf_filtered (" Total object size: %ld\n", c->total_size);
|
||||
printf_filtered (" Unique object size: %ld\n", c->unique_size);
|
||||
printf_filtered (" Percentage of duplicates, by size: ");
|
||||
print_percentage (c->total_size - c->unique_size, c->total_size);
|
||||
printf_filtered ("\n");
|
||||
|
||||
printf_filtered (" Total memory used by bcache, including overhead: %ld\n",
|
||||
c->structure_size);
|
||||
printf_filtered (" Percentage memory overhead: ");
|
||||
print_percentage (c->structure_size - c->unique_size, c->unique_size);
|
||||
printf_filtered (" Net memory savings: ");
|
||||
print_percentage (c->total_size - c->structure_size, c->total_size);
|
||||
printf_filtered ("\n");
|
||||
|
||||
printf_filtered (" Hash table size: %3d\n", c->num_buckets);
|
||||
printf_filtered (" Hash table population: ");
|
||||
print_percentage (occupied_buckets, c->num_buckets);
|
||||
printf_filtered (" Median hash chain length: %3d\n",
|
||||
median_chain_length);
|
||||
printf_filtered (" Average hash chain length: ");
|
||||
if (c->num_buckets > 0)
|
||||
printf_filtered ("%3ld\n", c->unique_count / c->num_buckets);
|
||||
else
|
||||
printf_filtered ("(not applicable)\n");
|
||||
printf_filtered (" Maximum hash chain length: %3d\n", max_chain_length);
|
||||
printf_filtered ("\n");
|
||||
}
|
||||
|
134
gdb/bcache.h
134
gdb/bcache.h
@ -1,6 +1,7 @@
|
||||
/* Include file cached obstack implementation.
|
||||
Written by Fred Fish (fnf@cygnus.com)
|
||||
Copyright 1995 Free Software Foundation, Inc.
|
||||
Written by Fred Fish <fnf@cygnus.com>
|
||||
Rewritten by Jim Blandy <jimb@cygnus.com>
|
||||
Copyright 1999 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
@ -22,52 +23,107 @@
|
||||
#ifndef BCACHE_H
|
||||
#define BCACHE_H 1
|
||||
|
||||
#define BCACHE_HASHLENGTH 12 /* Number of bits in hash value */
|
||||
#define BCACHE_HASHSIZE (1 << BCACHE_HASHLENGTH)
|
||||
#define BCACHE_MAXLENGTH 128
|
||||
/* A bcache is a data structure for factoring out duplication in
|
||||
read-only structures. You give the bcache some string of bytes S.
|
||||
If the bcache already contains a copy of S, it hands you back a
|
||||
pointer to its copy. Otherwise, it makes a fresh copy of S, and
|
||||
hands you back a pointer to that. In either case, you can throw
|
||||
away your copy of S, and use the bcache's.
|
||||
|
||||
/* Note that the user data is stored in data[]. Since it can be any type,
|
||||
it needs to have the same alignment as the most strict alignment of
|
||||
any type on the host machine. So do it the same way obstack does. */
|
||||
The "strings" in question are arbitrary strings of bytes --- they
|
||||
can contain zero bytes. You pass in the length explicitly when you
|
||||
call the bcache function.
|
||||
|
||||
struct hashlink
|
||||
This means that you can put ordinary C objects in a bcache.
|
||||
However, if you do this, remember that structs can contain `holes'
|
||||
between members, added for alignment. These bytes usually contain
|
||||
garbage. If you try to bcache two objects which are identical from
|
||||
your code's point of view, but have different garbage values in the
|
||||
structure's holes, then the bcache will treat them as separate
|
||||
strings, and you won't get the nice elimination of duplicates you
|
||||
were hoping for. So, remember to memset your structures full of
|
||||
zeros before bcaching them!
|
||||
|
||||
You shouldn't modify the strings you get from a bcache, because:
|
||||
|
||||
- You don't necessarily know who you're sharing space with. If I
|
||||
stick eight bytes of text in a bcache, and then stick an
|
||||
eight-byte structure in the same bcache, there's no guarantee
|
||||
those two objects don't actually comprise the same sequence of
|
||||
bytes. If they happen to, the bcache will use a single byte
|
||||
string for both of them. Then, modifying the structure will
|
||||
change the string. In bizarre ways.
|
||||
|
||||
- Even if you know for some other reason that all that's okay,
|
||||
there's another problem. A bcache stores all its strings in a
|
||||
hash table. If you modify a string's contents, you will probably
|
||||
change its hash value. This means that the modified string is
|
||||
now in the wrong place in the hash table, and future bcache
|
||||
probes will never find it. So by mutating a string, you give up
|
||||
any chance of sharing its space with future duplicates. */
|
||||
|
||||
|
||||
/* The type used to hold a single bcache string. The user data is
|
||||
stored in d.data. Since it can be any type, it needs to have the
|
||||
same alignment as the most strict alignment of any type on the host
|
||||
machine. I don't know of any really correct way to do this in
|
||||
stock ANSI C, so just do it the same way obstack.h does.
|
||||
|
||||
It would be nicer to have this stuff hidden away in bcache.c, but
|
||||
struct objstack contains a struct bcache directly --- not a pointer
|
||||
to one --- and then the memory-mapped stuff makes this a real pain.
|
||||
We don't strictly need to expose struct bstring, but it's better to
|
||||
have it all in one place. */
|
||||
|
||||
struct bstring {
|
||||
struct bstring *next;
|
||||
size_t length;
|
||||
|
||||
union
|
||||
{
|
||||
struct hashlink *next;
|
||||
union
|
||||
{
|
||||
char data[1];
|
||||
double dummy;
|
||||
}
|
||||
d;
|
||||
};
|
||||
char data[1];
|
||||
double dummy;
|
||||
}
|
||||
d;
|
||||
};
|
||||
|
||||
/* BCACHE_DATA is used to get the address of the cached data. */
|
||||
|
||||
#define BCACHE_DATA(p) ((p)->d.data)
|
||||
/* The structure for a bcache itself.
|
||||
To initialize a bcache, just fill it with zeros. */
|
||||
struct bcache {
|
||||
/* All the bstrings are allocated here. */
|
||||
struct obstack cache;
|
||||
|
||||
/* BCACHE_DATA_ALIGNMENT is used to get the offset of the start of
|
||||
cached data within the hashlink struct. This value, plus the
|
||||
size of the cached data, is the amount of space to allocate for
|
||||
a hashlink struct to hold the next pointer and the data. */
|
||||
/* How many hash buckets we're using. */
|
||||
int num_buckets;
|
||||
|
||||
/* Hash buckets. This table is allocated using malloc, so when we
|
||||
grow the table we can return the old table to the system. */
|
||||
struct bstring **bucket;
|
||||
|
||||
#define BCACHE_DATA_ALIGNMENT \
|
||||
(((char *) BCACHE_DATA((struct hashlink*) 0) - (char *) 0))
|
||||
/* Statistics. */
|
||||
long unique_count; /* number of unique strings */
|
||||
long total_count; /* total number of strings cached, including dups */
|
||||
long unique_size; /* size of unique strings, in bytes */
|
||||
long total_size; /* total number of bytes cached, including dups */
|
||||
long structure_size; /* total size of bcache, including infrastructure */
|
||||
};
|
||||
|
||||
struct bcache
|
||||
{
|
||||
struct obstack cache;
|
||||
struct hashlink **indextable[BCACHE_MAXLENGTH];
|
||||
int cache_hits;
|
||||
int cache_misses;
|
||||
int cache_bytes;
|
||||
int cache_savings;
|
||||
int bcache_overflows;
|
||||
};
|
||||
|
||||
extern void *
|
||||
bcache PARAMS ((void *bytes, int count, struct bcache * bcachep));
|
||||
/* Find a copy of the LENGTH bytes at ADDR in BCACHE. If BCACHE has
|
||||
never seen those bytes before, add a copy of them to BCACHE. In
|
||||
either case, return a pointer to BCACHE's copy of that string. */
|
||||
extern void *bcache (void *addr, int length, struct bcache *bcache);
|
||||
|
||||
extern void
|
||||
print_bcache_statistics PARAMS ((struct bcache *, char *));
|
||||
/* Free all the storage that BCACHE refers to. The result is a valid,
|
||||
but empty, bcache. This does not free BCACHE itself, since that
|
||||
might be part of some larger object. */
|
||||
extern void free_bcache (struct bcache *bcache);
|
||||
|
||||
/* Print statistics on BCACHE's memory usage and efficacity at
|
||||
eliminating duplication. TYPE should be a string describing the
|
||||
kind of data BCACHE holds. Statistics are printed using
|
||||
`printf_filtered' and its ilk. */
|
||||
extern void print_bcache_statistics (struct bcache *bcache, char *type);
|
||||
|
||||
#endif /* BCACHE_H */
|
||||
|
@ -2071,8 +2071,8 @@ print_it_typical (bs)
|
||||
here. */
|
||||
|
||||
case bp_finish:
|
||||
case bp_none:
|
||||
case bp_until:
|
||||
case bp_none:
|
||||
case bp_longjmp:
|
||||
case bp_longjmp_resume:
|
||||
case bp_step_resume:
|
||||
@ -2428,8 +2428,6 @@ bpstat_stop_status (pc, not_a_breakpoint)
|
||||
/* Don't stop. */
|
||||
bs->print_it = print_it_noop;
|
||||
bs->stop = 0;
|
||||
/* Don't consider this a hit. */
|
||||
--(b->hit_count);
|
||||
continue;
|
||||
default:
|
||||
/* Can't happen. */
|
||||
|
@ -610,7 +610,9 @@ coff_symfile_read (objfile, mainline)
|
||||
int stringtab_offset;
|
||||
struct cleanup *back_to;
|
||||
int stabstrsize;
|
||||
|
||||
int len;
|
||||
char * target;
|
||||
|
||||
info = (struct coff_symfile_info *) objfile->sym_private;
|
||||
dbxinfo = objfile->sym_stab_info;
|
||||
symfile_bfd = abfd; /* Kludge for swap routines */
|
||||
@ -643,7 +645,9 @@ coff_symfile_read (objfile, mainline)
|
||||
from the section address, rather than as absolute addresses.
|
||||
FIXME: We should use BFD to read the symbol table, and thus avoid
|
||||
this problem. */
|
||||
pe_file = strncmp (bfd_get_target (objfile->obfd), "pe", 2) == 0;
|
||||
pe_file = !
|
||||
( strncmp (bfd_get_target (objfile->obfd), "pe", 2)
|
||||
| strncmp (bfd_get_target (objfile->obfd), "epoc-pe", 7));
|
||||
|
||||
/* End of warning */
|
||||
|
||||
|
@ -243,6 +243,9 @@
|
||||
/* Define if you have the <sys/debugreg.h> header file. */
|
||||
#undef HAVE_SYS_DEBUGREG_H
|
||||
|
||||
/* Define if you have the <sys/ioctl.h> header file. */
|
||||
#undef HAVE_SYS_IOCTL_H
|
||||
|
||||
/* Define if you have the <sys/param.h> header file. */
|
||||
#undef HAVE_SYS_PARAM_H
|
||||
|
||||
|
@ -3,7 +3,7 @@ XDEPFILES= ser-tcp.o
|
||||
XM_FILE= xm-alphalinux.h
|
||||
NAT_FILE= nm-linux.h
|
||||
NATDEPFILES= infptrace.o inftarg.o corelow.o core-regset.o alpha-nat.o \
|
||||
fork-child.o solib.o
|
||||
fork-child.o solib.o linux-thread.o
|
||||
|
||||
MMALLOC =
|
||||
MMALLOC_CFLAGS = -DNO_MMALLOC
|
||||
|
@ -18,6 +18,8 @@
|
||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include "nm-linux.h"
|
||||
|
||||
/* Figure out where the longjmp will land. We expect that we have just entered
|
||||
longjmp and haven't yet setup the stack frame, so the args are still in the
|
||||
argument regs. A0_REGNUM points at the jmp_buf structure from which we
|
||||
@ -28,13 +30,12 @@
|
||||
extern int
|
||||
get_longjmp_target PARAMS ((CORE_ADDR *));
|
||||
|
||||
/* Tell gdb that we can attach and detach other processes */
|
||||
#define ATTACH_DETACH
|
||||
|
||||
/* ptrace register ``addresses'' are absolute. */
|
||||
|
||||
#define U_REGS_OFFSET 0
|
||||
|
||||
/* FIXME: This is probably true, or should be, on all Linux ports.
|
||||
IA64? Sparc64? */
|
||||
#define PTRACE_ARG3_TYPE long
|
||||
|
||||
/* ptrace transfers longs, the ptrace man page is lying. */
|
||||
@ -51,10 +52,7 @@ get_longjmp_target PARAMS ((CORE_ADDR *));
|
||||
|
||||
/* Support for shared libraries. */
|
||||
|
||||
#include "solib.h"
|
||||
|
||||
#ifdef __ELF__
|
||||
#define SVR4_SHARED_LIBS
|
||||
#define TARGET_ELF64
|
||||
#endif
|
||||
|
||||
@ -65,3 +63,4 @@ get_longjmp_target PARAMS ((CORE_ADDR *));
|
||||
/* Given a pointer to either a gregset_t or fpregset_t, return a
|
||||
pointer to the first register. */
|
||||
#define ALPHA_REGSET_BASE(regsetp) ((long *) (regsetp))
|
||||
|
||||
|
@ -75,7 +75,6 @@ extern long alpha_linux_sigtramp_offset PARAMS ((CORE_ADDR));
|
||||
#undef FRAME_PAST_SIGTRAMP_FRAME
|
||||
#define FRAME_PAST_SIGTRAMP_FRAME(frame, pc) (0)
|
||||
|
||||
/* We need this for the SOLIB_TRAMPOLINE stuff. */
|
||||
#include "tm-sysv4.h"
|
||||
#include "tm-linux.h"
|
||||
|
||||
#endif /* TM_LINUXALPHA_H */
|
||||
|
@ -23,15 +23,13 @@
|
||||
#define NM_LINUX_H
|
||||
|
||||
#include "i386/nm-i386v.h"
|
||||
#include "nm-linux.h"
|
||||
|
||||
/* Return sizeof user struct to callers in less machine dependent routines */
|
||||
|
||||
#define KERNEL_U_SIZE kernel_u_size()
|
||||
extern int kernel_u_size PARAMS ((void));
|
||||
|
||||
/* Tell gdb that we can attach and detach other processes */
|
||||
#define ATTACH_DETACH
|
||||
|
||||
#define U_REGS_OFFSET 0
|
||||
|
||||
/* GNU/Linux supports the 386 hardware debugging registers. */
|
||||
@ -74,14 +72,4 @@ i386_insert_watchpoint PARAMS ((int pid, CORE_ADDR addr, int len, int rw));
|
||||
extern int
|
||||
i386_remove_watchpoint PARAMS ((int pid, CORE_ADDR addr, int len));
|
||||
|
||||
/* Support for the glibc linuxthreads package. */
|
||||
|
||||
extern char *
|
||||
linuxthreads_pid_to_str PARAMS ((int pid));
|
||||
#define target_pid_to_str(PID) linuxthreads_pid_to_str (PID)
|
||||
|
||||
extern int
|
||||
linuxthreads_prepare_to_proceed PARAMS ((int step));
|
||||
#define PREPARE_TO_PROCEED(select_it) linuxthreads_prepare_to_proceed (1)
|
||||
|
||||
#endif /* #ifndef NM_LINUX_H */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Macro definitions for i386 running under the win32 API Unix.
|
||||
Copyright 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright 1995 - 1999 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
@ -19,105 +19,11 @@
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
#undef HAVE_SSE_REGS /* FIXME! win32-nat.c needs to support XMMi registers */
|
||||
#define HAVE_I387_REGS
|
||||
|
||||
#include "i386/tm-i386v.h"
|
||||
|
||||
#undef MAX_REGISTER_RAW_SIZE
|
||||
#undef MAX_REGISTER_VIRTUAL_SIZE
|
||||
#undef NUM_REGS
|
||||
#undef REGISTER_BYTE
|
||||
#undef REGISTER_BYTES
|
||||
#undef REGISTER_CONVERTIBLE
|
||||
#undef REGISTER_CONVERT_TO_RAW
|
||||
#undef REGISTER_CONVERT_TO_VIRTUAL
|
||||
#undef REGISTER_NAMES
|
||||
#undef REGISTER_RAW_SIZE
|
||||
#undef REGISTER_VIRTUAL_SIZE
|
||||
#undef REGISTER_VIRTUAL_TYPE
|
||||
|
||||
/* Number of machine registers */
|
||||
|
||||
#define NUM_REGS 24
|
||||
|
||||
/* Initializer for an array of names of registers.
|
||||
There should be NUM_REGS strings in this initializer. */
|
||||
|
||||
/* the order of the first 8 registers must match the compiler's
|
||||
* numbering scheme (which is the same as the 386 scheme)
|
||||
* also, this table must match regmap in i386-pinsn.c.
|
||||
*/
|
||||
|
||||
#define REGISTER_NAMES { "eax", "ecx", "edx", "ebx", \
|
||||
"esp", "ebp", "esi", "edi", \
|
||||
"eip", "ps", "cs", "ss", \
|
||||
"ds", "es", "fs", "gs", \
|
||||
"st", "st(1)","st(2)","st(3)",\
|
||||
"st(4)","st(5)","st(6)","st(7)",}
|
||||
|
||||
#define FP0_REGNUM 16
|
||||
|
||||
/* Total amount of space needed to store our copies of the machine's
|
||||
register state, the array `registers'. */
|
||||
|
||||
#define REGISTER_BYTES (16 * 4 + 8 * 10)
|
||||
|
||||
/* Index within `registers' of the first byte of the space for
|
||||
register N. */
|
||||
|
||||
#define REGISTER_BYTE(N) (((N) < 16) ? (N) * 4 : (((N) - 16) * 10) + (16 * 4))
|
||||
|
||||
/* Number of bytes of storage in the actual machine representation
|
||||
for register N. */
|
||||
|
||||
#define REGISTER_RAW_SIZE(N) (((N) < 16) ? 4 : 10)
|
||||
|
||||
/* Number of bytes of storage in the program's representation
|
||||
for register N. */
|
||||
|
||||
#define REGISTER_VIRTUAL_SIZE(N) (((N) < 16) ? 4 : 10)
|
||||
|
||||
/* Largest value REGISTER_RAW_SIZE can have. */
|
||||
|
||||
#define MAX_REGISTER_RAW_SIZE 10
|
||||
|
||||
/* Largest value REGISTER_VIRTUAL_SIZE can have. */
|
||||
|
||||
#define MAX_REGISTER_VIRTUAL_SIZE 10
|
||||
|
||||
/* Nonzero if register N requires conversion
|
||||
from raw format to virtual format. */
|
||||
|
||||
#define REGISTER_CONVERTIBLE(N) \
|
||||
((N < FP0_REGNUM) ? 0 : 1)
|
||||
|
||||
/* Convert data from raw format for register REGNUM in buffer FROM
|
||||
to virtual format with type TYPE in buffer TO. */
|
||||
extern void
|
||||
i387_to_double PARAMS ((char *, char *));
|
||||
|
||||
|
||||
#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \
|
||||
{ \
|
||||
double val; \
|
||||
i387_to_double ((FROM), (char *)&val); \
|
||||
store_floating ((TO), TYPE_LENGTH (TYPE), val); \
|
||||
}
|
||||
|
||||
extern void
|
||||
double_to_i387 PARAMS ((char *, char *));
|
||||
|
||||
#define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \
|
||||
{ \
|
||||
double val = extract_floating ((FROM), TYPE_LENGTH (TYPE)); \
|
||||
double_to_i387((char *)&val, (TO)); \
|
||||
}
|
||||
|
||||
/* Return the GDB type object for the "standard" data type
|
||||
of data in register N. */
|
||||
|
||||
#define REGISTER_VIRTUAL_TYPE(N) \
|
||||
((N < FP0_REGNUM) ? builtin_type_int : \
|
||||
builtin_type_double)
|
||||
|
||||
#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) skip_trampoline_code (pc, name)
|
||||
#define SKIP_TRAMPOLINE_CODE(pc) skip_trampoline_code (pc, 0)
|
||||
extern CORE_ADDR skip_trampoline_code PARAMS ((CORE_ADDR pc, char *name));
|
||||
|
@ -32,73 +32,6 @@
|
||||
#undef START_INFERIOR_TRAPS_EXPECTED
|
||||
#define START_INFERIOR_TRAPS_EXPECTED 4
|
||||
|
||||
/* Number of machine registers */
|
||||
|
||||
#undef NUM_REGS
|
||||
#define NUM_REGS 16
|
||||
|
||||
/* Initializer for an array of names of registers.
|
||||
There should be NUM_REGS strings in this initializer. */
|
||||
|
||||
/* the order of the first 8 registers must match the compiler's
|
||||
* numbering scheme (which is the same as the 386 scheme)
|
||||
* also, this table must match regmap in i386-pinsn.c.
|
||||
*/
|
||||
|
||||
#undef REGISTER_NAMES
|
||||
#define REGISTER_NAMES { "eax", "ecx", "edx", "ebx", \
|
||||
"esp", "ebp", "esi", "edi", \
|
||||
"eip", "ps", "cs", "ss", \
|
||||
"ds", "es", "fs", "gs", \
|
||||
}
|
||||
|
||||
/* Total amount of space needed to store our copies of the machine's
|
||||
register state, the array `registers'. */
|
||||
|
||||
#undef REGISTER_BYTES
|
||||
#define REGISTER_BYTES (NUM_REGS * 4)
|
||||
|
||||
/* Index within `registers' of the first byte of the space for
|
||||
register N. */
|
||||
|
||||
#undef REGISTER_BYTE
|
||||
#define REGISTER_BYTE(N) ((N)*4)
|
||||
|
||||
/* Number of bytes of storage in the actual machine representation
|
||||
for register N. */
|
||||
|
||||
#undef REGISTER_RAW_SIZE
|
||||
#define REGISTER_RAW_SIZE(N) (4)
|
||||
|
||||
/* Number of bytes of storage in the program's representation
|
||||
for register N. */
|
||||
|
||||
#undef REGISTER_VIRTUAL_SIZE
|
||||
#define REGISTER_VIRTUAL_SIZE(N) (4)
|
||||
|
||||
/* Largest value REGISTER_RAW_SIZE can have. */
|
||||
|
||||
#undef MAX_REGISTER_RAW_SIZE
|
||||
#define MAX_REGISTER_RAW_SIZE 4
|
||||
|
||||
/* Largest value REGISTER_VIRTUAL_SIZE can have. */
|
||||
|
||||
#undef MAX_REGISTER_VIRTUAL_SIZE
|
||||
#define MAX_REGISTER_VIRTUAL_SIZE 4
|
||||
|
||||
/* Return the GDB type object for the "standard" data type
|
||||
of data in register N. */
|
||||
/* Perhaps si and di should go here, but potentially they could be
|
||||
used for things other than address. */
|
||||
|
||||
#undef REGISTER_VIRTUAL_TYPE
|
||||
#define REGISTER_VIRTUAL_TYPE(N) \
|
||||
((N) == PC_REGNUM || (N) == FP_REGNUM || (N) == SP_REGNUM ? \
|
||||
lookup_pointer_type (builtin_type_void) : builtin_type_int)
|
||||
|
||||
/* Store the address of the place in which to copy the structure the
|
||||
subroutine will return. This is called from call_function. */
|
||||
|
||||
#undef STORE_STRUCT_RETURN
|
||||
#define STORE_STRUCT_RETURN(ADDR, SP) \
|
||||
{ char buf[REGISTER_SIZE]; \
|
||||
|
@ -28,6 +28,7 @@
|
||||
#endif
|
||||
|
||||
#include "i386/tm-i386.h"
|
||||
#include "tm-linux.h"
|
||||
|
||||
/* Size of sigcontext, from <asm/sigcontext.h>. */
|
||||
#define LINUX_SIGCONTEXT_SIZE (88)
|
||||
@ -38,10 +39,6 @@
|
||||
/* Offset to saved SP in sigcontext, from <asm/sigcontext.h>. */
|
||||
#define LINUX_SIGCONTEXT_SP_OFFSET (28)
|
||||
|
||||
/* We need this file for the SOLIB_TRAMPOLINE stuff. */
|
||||
|
||||
#include "tm-sysv4.h"
|
||||
|
||||
#define LOW_RETURN_REGNUM 0 /* holds low four bytes of result */
|
||||
#define HIGH_RETURN_REGNUM 2 /* holds high four bytes of result */
|
||||
|
||||
@ -167,18 +164,6 @@ extern CORE_ADDR i386_linux_sigtramp_saved_pc PARAMS ((struct frame_info *));
|
||||
|
||||
extern CORE_ADDR i386_linux_sigtramp_saved_sp PARAMS ((struct frame_info *));
|
||||
|
||||
/* Some versions of Linux have real-time signal support in the C library, and
|
||||
some don't. We have to include this file to find out. */
|
||||
#include <signal.h>
|
||||
|
||||
#ifdef __SIGRTMIN
|
||||
#define REALTIME_LO __SIGRTMIN
|
||||
#define REALTIME_HI (__SIGRTMAX + 1)
|
||||
#else
|
||||
#define REALTIME_LO 32
|
||||
#define REALTIME_HI 64
|
||||
#endif
|
||||
|
||||
/* When we call a function in a shared library, and the PLT sends us
|
||||
into the dynamic linker to find the function's real address, we
|
||||
need to skip over the dynamic linker call. This function decides
|
||||
|
@ -4,6 +4,7 @@ XM_FILE= xm-linux.h
|
||||
XDEPFILES= ser-tcp.o
|
||||
|
||||
NAT_FILE= nm-linux.h
|
||||
NATDEPFILES= infptrace.o solib.o inftarg.o fork-child.o corelow.o core-aout.o core-regset.o m68klinux-nat.o
|
||||
NATDEPFILES= infptrace.o solib.o inftarg.o fork-child.o \
|
||||
corelow.o core-aout.o core-regset.o m68klinux-nat.o linux-thread.o
|
||||
|
||||
GDBSERVER_DEPFILES= low-linux.o
|
||||
|
@ -21,24 +21,15 @@
|
||||
#ifndef NM_LINUX_H
|
||||
#define NM_LINUX_H
|
||||
|
||||
#include "nm-linux.h"
|
||||
|
||||
/* Return sizeof user struct to callers in less machine dependent routines */
|
||||
|
||||
#define KERNEL_U_SIZE kernel_u_size()
|
||||
extern int kernel_u_size PARAMS ((void));
|
||||
|
||||
/* Tell gdb that we can attach and detach other processes */
|
||||
#define ATTACH_DETACH
|
||||
|
||||
#define U_REGS_OFFSET 0
|
||||
|
||||
/* We define this if link.h is available, because with ELF we use SVR4 style
|
||||
shared libraries. */
|
||||
|
||||
#ifdef HAVE_LINK_H
|
||||
#define SVR4_SHARED_LIBS
|
||||
#include "solib.h" /* Support for shared libraries. */
|
||||
#endif
|
||||
|
||||
#define REGISTER_U_ADDR(addr, blockend, regno) \
|
||||
(addr) = m68k_linux_register_u_addr ((blockend),(regno));
|
||||
|
||||
|
@ -72,7 +72,7 @@
|
||||
} \
|
||||
}
|
||||
|
||||
#include "tm-sysv4.h"
|
||||
#include "tm-linux.h"
|
||||
#include "m68k/tm-m68k.h"
|
||||
|
||||
/* Extract from an array REGBUF containing the (raw) register state
|
||||
|
25
gdb/config/mips/tm-vr4xxx.h
Normal file
25
gdb/config/mips/tm-vr4xxx.h
Normal file
@ -0,0 +1,25 @@
|
||||
/* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
This program 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 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#define GDB_MULTI_ARCH 1
|
||||
#define MIPS_DEFAULT_FPU_TYPE MIPS_FPU_DOUBLE
|
||||
#define TARGET_BYTE_ORDER_SELECTABLE_P 1
|
||||
#define TARGET_MONITOR_PROMPT "<RISQ> "
|
||||
|
||||
#include "mips/tm-bigmips64.h"
|
25
gdb/config/mips/tm-vr4xxxel.h
Normal file
25
gdb/config/mips/tm-vr4xxxel.h
Normal file
@ -0,0 +1,25 @@
|
||||
/* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
This program 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 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#define GDB_MULTI_ARCH 1
|
||||
#define MIPS_DEFAULT_FPU_TYPE MIPS_FPU_DOUBLE
|
||||
#define TARGET_BYTE_ORDER_SELECTABLE_P 1
|
||||
#define TARGET_MONITOR_PROMPT "<RISQ> "
|
||||
|
||||
#include "mips/tm-mips64.h"
|
@ -17,6 +17,7 @@
|
||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#define GDB_MULTI_ARCH 1
|
||||
#define TARGET_BYTE_ORDER_SELECTABLE_P 1
|
||||
#define TARGET_MONITOR_PROMPT "<RISQ> "
|
||||
#define MIPS_EABI 1
|
||||
|
@ -17,6 +17,7 @@
|
||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#define GDB_MULTI_ARCH 1
|
||||
#define TARGET_BYTE_ORDER_SELECTABLE_P 1
|
||||
#define TARGET_MONITOR_PROMPT "<RISQ> "
|
||||
#define MIPS_EABI 1
|
||||
|
5
gdb/config/mips/vr4xxx.mt
Normal file
5
gdb/config/mips/vr4xxx.mt
Normal file
@ -0,0 +1,5 @@
|
||||
# Target: Big-endian SIM monitor board.
|
||||
TDEPFILES= mips-tdep.o remote-mips.o
|
||||
TM_FILE= tm-vr4xxx.h
|
||||
SIM_OBS = remote-sim.o
|
||||
SIM = ../sim/mips/libsim.a
|
5
gdb/config/mips/vr4xxxel.mt
Normal file
5
gdb/config/mips/vr4xxxel.mt
Normal file
@ -0,0 +1,5 @@
|
||||
# Target: Big-endian SIM monitor board.
|
||||
TDEPFILES= mips-tdep.o remote-mips.o
|
||||
TM_FILE= tm-vr4xxxel.h
|
||||
SIM_OBS = remote-sim.o
|
||||
SIM = ../sim/mips/libsim.a
|
50
gdb/config/nm-linux.h
Normal file
50
gdb/config/nm-linux.h
Normal file
@ -0,0 +1,50 @@
|
||||
/* Native support for GNU/Linux, for GDB, the GNU debugger.
|
||||
Copyright (C) 1999
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
This program 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 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Linux is svr4ish but not that much */
|
||||
#undef USE_PROC_FS
|
||||
|
||||
/* Tell gdb that we can attach and detach other processes */
|
||||
#define ATTACH_DETACH
|
||||
|
||||
/* We define this if link.h is available, because with ELF we use SVR4 style
|
||||
shared libraries. */
|
||||
|
||||
#ifdef HAVE_LINK_H
|
||||
#define SVR4_SHARED_LIBS
|
||||
#include "solib.h" /* Support for shared libraries. */
|
||||
#endif
|
||||
|
||||
/* Support for the glibc linuxthreads package. */
|
||||
|
||||
struct objfile;
|
||||
|
||||
extern void
|
||||
linuxthreads_new_objfile PARAMS ((struct objfile *objfile));
|
||||
#define target_new_objfile(OBJFILE) linuxthreads_new_objfile (OBJFILE)
|
||||
|
||||
extern char *
|
||||
linuxthreads_pid_to_str PARAMS ((int pid));
|
||||
#define target_pid_to_str(PID) linuxthreads_pid_to_str (PID)
|
||||
|
||||
extern int
|
||||
linuxthreads_prepare_to_proceed PARAMS ((int step));
|
||||
#define PREPARE_TO_PROCEED(select_it) linuxthreads_prepare_to_proceed (1)
|
@ -2,6 +2,7 @@
|
||||
XDEPFILES= ser-tcp.o
|
||||
XM_FILE= xm-linux.h
|
||||
NAT_FILE= nm-linux.h
|
||||
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o sparc-nat.o
|
||||
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o sparc-nat.o \
|
||||
linux-thread.o
|
||||
HOST_IPC=-DBSD_IPC
|
||||
GDBSERVER_DEPFILES= low-sparc.o
|
||||
|
@ -27,6 +27,3 @@
|
||||
|
||||
#define KERNEL_U_SIZE kernel_u_size()
|
||||
extern int kernel_u_size PARAMS ((void));
|
||||
|
||||
/* Linux is svr4ish but not that much */
|
||||
#undef USE_PROC_FS
|
||||
|
@ -25,6 +25,6 @@
|
||||
|
||||
#define SIGCONTEXT_PC_OFFSET 12
|
||||
|
||||
#include "tm-sysv4.h"
|
||||
#include "tm-linux.h"
|
||||
|
||||
#endif /* TM_SPARCLINUX_H */
|
||||
|
36
gdb/config/tm-linux.h
Normal file
36
gdb/config/tm-linux.h
Normal file
@ -0,0 +1,36 @@
|
||||
/* Native support for GNU/Linux, for GDB, the GNU debugger.
|
||||
Copyright (C) 1999
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
This program 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 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Some versions of Linux have real-time signal support in the C library, and
|
||||
some don't. We have to include this file to find out. */
|
||||
#include <signal.h>
|
||||
|
||||
#ifdef __SIGRTMIN
|
||||
#define REALTIME_LO __SIGRTMIN
|
||||
#define REALTIME_HI (__SIGRTMAX + 1)
|
||||
#else
|
||||
#define REALTIME_LO 32
|
||||
#define REALTIME_HI 64
|
||||
#endif
|
||||
|
||||
/* We need this file for the SOLIB_TRAMPOLINE stuff. */
|
||||
|
||||
#include "tm-sysv4.h"
|
2
gdb/configure
vendored
2
gdb/configure
vendored
@ -3228,7 +3228,7 @@ for ac_hdr in ctype.h curses.h endian.h link.h \
|
||||
string.h sys/procfs.h sys/ptrace.h sys/reg.h \
|
||||
term.h termio.h termios.h unistd.h wait.h sys/wait.h \
|
||||
wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \
|
||||
time.h
|
||||
time.h sys/ioctl.h
|
||||
do
|
||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||
|
@ -84,7 +84,7 @@ AC_CHECK_HEADERS(ctype.h curses.h endian.h link.h \
|
||||
string.h sys/procfs.h sys/ptrace.h sys/reg.h \
|
||||
term.h termio.h termios.h unistd.h wait.h sys/wait.h \
|
||||
wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \
|
||||
time.h)
|
||||
time.h sys/ioctl.h)
|
||||
AC_HEADER_STAT
|
||||
|
||||
AC_C_CONST
|
||||
|
@ -169,6 +169,8 @@ mips*-dec-mach3*) gdb_target=mach3 ;;
|
||||
mips*-dec-*) gdb_target=decstation ;;
|
||||
mips64*el-*-ecoff*) gdb_target=embedl64 ;;
|
||||
mips64*-*-ecoff*) gdb_target=embed64 ;;
|
||||
mips64*vr4xxx*el-*-elf*)gdb_target=vr4xxxel ;;
|
||||
mips64*vr4xxx*-*-elf*) gdb_target=vr4xxx ;;
|
||||
mips64*vr4300*el-*-elf*) gdb_target=vr4300el ;;
|
||||
mips64*vr4300*-*-elf*) gdb_target=vr4300 ;;
|
||||
mips64*vr4100*el-*-elf*) gdb_target=vr4300el ;;
|
||||
|
@ -90,7 +90,7 @@ core_file_command (filename, from_tty)
|
||||
symfile = t->to_core_file_to_sym_file (filename);
|
||||
if (symfile)
|
||||
{
|
||||
char *symfile_copy = strdup (symfile);
|
||||
char *symfile_copy = xstrdup (symfile);
|
||||
|
||||
make_cleanup (free, symfile_copy);
|
||||
symbol_file_command (symfile_copy, from_tty);
|
||||
@ -185,7 +185,7 @@ reopen_exec_file ()
|
||||
return;
|
||||
|
||||
/* If the timestamp of the exec file has changed, reopen it. */
|
||||
filename = strdup (bfd_get_filename (exec_bfd));
|
||||
filename = xstrdup (bfd_get_filename (exec_bfd));
|
||||
make_cleanup (free, filename);
|
||||
mtime = bfd_get_mtime (exec_bfd);
|
||||
res = stat (filename, &st);
|
||||
|
@ -604,6 +604,7 @@ dbx_symfile_read (objfile, mainline)
|
||||
|| (0 == strncmp (bfd_get_target (sym_bfd), "som", 3))
|
||||
|| (0 == strncmp (bfd_get_target (sym_bfd), "coff", 4))
|
||||
|| (0 == strncmp (bfd_get_target (sym_bfd), "pe", 2))
|
||||
|| (0 == strncmp (bfd_get_target (sym_bfd), "epoc-pe", 7))
|
||||
|| (0 == strncmp (bfd_get_target (sym_bfd), "nlm", 3)));
|
||||
|
||||
val = bfd_seek (sym_bfd, DBX_SYMTAB_OFFSET (objfile), SEEK_SET);
|
||||
|
@ -538,6 +538,13 @@ dcache_info (exp, tty)
|
||||
}
|
||||
}
|
||||
|
||||
/* Turn dcache on or off. */
|
||||
void
|
||||
set_dcache_state (int what)
|
||||
{
|
||||
dcache_enabled_p = !!what;
|
||||
}
|
||||
|
||||
void
|
||||
_initialize_dcache ()
|
||||
{
|
||||
|
@ -48,4 +48,8 @@ int dcache_xfer_memory PARAMS ((DCACHE * cache, CORE_ADDR mem, char *my, int len
|
||||
|
||||
/* Write the bytes at ADDR into the data cache and the remote machine. */
|
||||
int dcache_poke_block PARAMS ((DCACHE * cache, CORE_ADDR mem, char *my, int len));
|
||||
|
||||
/* Turn dcache state on or off */
|
||||
void set_dcache_state (int);
|
||||
|
||||
#endif /* DCACHE_H */
|
||||
|
12
gdb/defs.h
12
gdb/defs.h
@ -689,6 +689,8 @@ struct continuation continuation;
|
||||
|
||||
/* In infrun.c. */
|
||||
extern struct continuation *cmd_continuation;
|
||||
/* Used only by the step_1 function. */
|
||||
extern struct continuation *intermediate_continuation;
|
||||
|
||||
/* From utils.c */
|
||||
extern void add_continuation (void (*)(struct continuation_arg *),
|
||||
@ -696,6 +698,11 @@ extern void add_continuation (void (*)(struct continuation_arg *),
|
||||
extern void do_all_continuations (void);
|
||||
extern void discard_all_continuations (void);
|
||||
|
||||
extern void add_intermediate_continuation (void (*)(struct continuation_arg *),
|
||||
struct continuation_arg *);
|
||||
extern void do_all_intermediate_continuations (void);
|
||||
extern void discard_all_intermediate_continuations (void);
|
||||
|
||||
/* String containing the current directory (what getwd would return). */
|
||||
|
||||
extern char *current_directory;
|
||||
@ -1181,6 +1188,11 @@ extern int event_loop_p;
|
||||
|
||||
extern void (*init_ui_hook) (char *argv0);
|
||||
extern void (*command_loop_hook) (void);
|
||||
extern void (*show_load_progress) (const char *section,
|
||||
unsigned long section_sent,
|
||||
unsigned long section_size,
|
||||
unsigned long total_sent,
|
||||
unsigned long total_size);
|
||||
/* NOTE: cagney/1999-10-14: fputs_unfiltered_hook is deprecated.
|
||||
Instead code wanting to control GDB's output should be overriding
|
||||
the gdb_std* files. */
|
||||
|
@ -227,7 +227,7 @@ exec_file_attach (args, from_tty)
|
||||
same malloc'd string. However exec_close() will attempt to free it
|
||||
via the exec_bfd->name pointer, so we need to make another copy and
|
||||
leave exec_bfd as the new owner of the original copy. */
|
||||
scratch_pathname = strdup (scratch_pathname);
|
||||
scratch_pathname = xstrdup (scratch_pathname);
|
||||
make_cleanup (free, scratch_pathname);
|
||||
|
||||
if (!bfd_check_format (exec_bfd, bfd_object))
|
||||
|
102
gdb/findvar.c
102
gdb/findvar.c
@ -258,25 +258,6 @@ store_address (addr, len, val)
|
||||
store_unsigned_integer (addr, len, val);
|
||||
}
|
||||
|
||||
/* Swap LEN bytes at BUFFER between target and host byte-order. */
|
||||
#define SWAP_FLOATING(buffer,len) \
|
||||
do \
|
||||
{ \
|
||||
if (TARGET_BYTE_ORDER != HOST_BYTE_ORDER) \
|
||||
{ \
|
||||
char tmp; \
|
||||
char *p = (char *)(buffer); \
|
||||
char *q = ((char *)(buffer)) + len - 1; \
|
||||
for (; p < q; p++, q--) \
|
||||
{ \
|
||||
tmp = *q; \
|
||||
*q = *p; \
|
||||
*p = tmp; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
/* Extract a floating-point number from a target-order byte-stream at ADDR.
|
||||
Returns the value as type DOUBLEST.
|
||||
|
||||
@ -680,20 +661,22 @@ registers_fetched ()
|
||||
register_valid[i] = 1;
|
||||
}
|
||||
|
||||
/* read_register_bytes and write_register_bytes are generally a *BAD* idea.
|
||||
They are inefficient because they need to check for partial updates, which
|
||||
can only be done by scanning through all of the registers and seeing if the
|
||||
bytes that are being read/written fall inside of an invalid register. [The
|
||||
main reason this is necessary is that register sizes can vary, so a simple
|
||||
index won't suffice.] It is far better to call read_register_gen if you
|
||||
want to get at the raw register contents, as it only takes a regno as an
|
||||
argument, and therefore can't do a partial register update. It would also
|
||||
be good to have a write_register_gen for similar reasons.
|
||||
/* read_register_bytes and write_register_bytes are generally a *BAD*
|
||||
idea. They are inefficient because they need to check for partial
|
||||
updates, which can only be done by scanning through all of the
|
||||
registers and seeing if the bytes that are being read/written fall
|
||||
inside of an invalid register. [The main reason this is necessary
|
||||
is that register sizes can vary, so a simple index won't suffice.]
|
||||
It is far better to call read_register_gen and write_register_gen
|
||||
if you want to get at the raw register contents, as it only takes a
|
||||
regno as an argument, and therefore can't do a partial register
|
||||
update.
|
||||
|
||||
Prior to the recent fixes to check for partial updates, both read and
|
||||
write_register_bytes always checked to see if any registers were stale, and
|
||||
then called target_fetch_registers (-1) to update the whole set. This
|
||||
caused really slowed things down for remote targets. */
|
||||
Prior to the recent fixes to check for partial updates, both read
|
||||
and write_register_bytes always checked to see if any registers
|
||||
were stale, and then called target_fetch_registers (-1) to update
|
||||
the whole set. This caused really slowed things down for remote
|
||||
targets. */
|
||||
|
||||
/* Copy INLEN bytes of consecutive data from registers
|
||||
starting with the INREGBYTE'th byte of register data
|
||||
@ -720,7 +703,6 @@ read_register_bytes (inregbyte, myaddr, inlen)
|
||||
for (regno = 0; regno < NUM_REGS; regno++)
|
||||
{
|
||||
int regstart, regend;
|
||||
int startin, endin;
|
||||
|
||||
if (register_valid[regno])
|
||||
continue;
|
||||
@ -731,15 +713,12 @@ read_register_bytes (inregbyte, myaddr, inlen)
|
||||
regstart = REGISTER_BYTE (regno);
|
||||
regend = regstart + REGISTER_RAW_SIZE (regno);
|
||||
|
||||
startin = regstart >= inregbyte && regstart < inregend;
|
||||
endin = regend > inregbyte && regend <= inregend;
|
||||
|
||||
if (!startin && !endin)
|
||||
if (regend <= inregbyte || inregend <= regstart)
|
||||
/* The range the user wants to read doesn't overlap with regno. */
|
||||
continue;
|
||||
|
||||
/* We've found an invalid register where at least one byte will be read.
|
||||
Update it from the target. */
|
||||
|
||||
target_fetch_registers (regno);
|
||||
|
||||
if (!register_valid[regno])
|
||||
@ -832,40 +811,41 @@ write_register_bytes (myregstart, myaddr, inlen)
|
||||
for (regno = 0; regno < NUM_REGS; regno++)
|
||||
{
|
||||
int regstart, regend;
|
||||
int startin, endin;
|
||||
char regbuf[MAX_REGISTER_RAW_SIZE];
|
||||
|
||||
regstart = REGISTER_BYTE (regno);
|
||||
regend = regstart + REGISTER_RAW_SIZE (regno);
|
||||
|
||||
startin = regstart >= myregstart && regstart < myregend;
|
||||
endin = regend > myregstart && regend <= myregend;
|
||||
/* Is this register completely outside the range the user is writing? */
|
||||
if (myregend <= regstart || regend <= myregstart)
|
||||
/* do nothing */ ;
|
||||
|
||||
if (!startin && !endin)
|
||||
continue; /* Register is completely out of range */
|
||||
/* Is this register completely within the range the user is writing? */
|
||||
else if (myregstart <= regstart && regend <= myregend)
|
||||
write_register_gen (regno, myaddr + (regstart - myregstart));
|
||||
|
||||
if (startin && endin) /* register is completely in range */
|
||||
/* The register partially overlaps the range being written. */
|
||||
else
|
||||
{
|
||||
write_register_gen (regno, myaddr + (regstart - myregstart));
|
||||
continue;
|
||||
char regbuf[MAX_REGISTER_RAW_SIZE];
|
||||
/* What's the overlap between this register's bytes and
|
||||
those the caller wants to write? */
|
||||
int overlapstart = max (regstart, myregstart);
|
||||
int overlapend = min (regend, myregend);
|
||||
|
||||
/* We may be doing a partial update of an invalid register.
|
||||
Update it from the target before scribbling on it. */
|
||||
read_register_gen (regno, regbuf);
|
||||
|
||||
memcpy (registers + overlapstart,
|
||||
myaddr + (overlapstart - myregstart),
|
||||
overlapend - overlapstart);
|
||||
|
||||
target_store_registers (regno);
|
||||
}
|
||||
|
||||
/* We may be doing a partial update of an invalid register. Update it
|
||||
from the target before scribbling on it. */
|
||||
read_register_gen (regno, regbuf);
|
||||
|
||||
if (startin)
|
||||
memcpy (registers + regstart,
|
||||
myaddr + regstart - myregstart,
|
||||
myregend - regstart);
|
||||
else /* endin */
|
||||
memcpy (registers + myregstart,
|
||||
myaddr,
|
||||
regend - myregstart);
|
||||
target_store_registers (regno);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Return the raw contents of register REGNO, regarding it as an integer. */
|
||||
/* This probably should be returning LONGEST rather than CORE_ADDR. */
|
||||
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "gdbcore.h"
|
||||
#include "terminal.h"
|
||||
#include "gdbthread.h"
|
||||
#include "command.h" /* for dont_repeat () */
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
|
@ -66,6 +66,10 @@ struct type *builtin_type_int64;
|
||||
struct type *builtin_type_uint64;
|
||||
struct type *builtin_type_bool;
|
||||
struct type *builtin_type_v4sf;
|
||||
struct type *builtin_type_v4si;
|
||||
struct type *builtin_type_v8qi;
|
||||
struct type *builtin_type_v4hi;
|
||||
struct type *builtin_type_v2si;
|
||||
|
||||
int opaque_type_resolution = 1;
|
||||
|
||||
@ -644,7 +648,7 @@ create_set_type (result_type, domain_type)
|
||||
init_simd_type ("__builtin_v4sf", builtin_type_float, "f", 4)
|
||||
The type returned is a permanent type, allocated using malloc; it
|
||||
doesn't live in any objfile's obstack. */
|
||||
struct type *
|
||||
static struct type *
|
||||
init_simd_type (char *name,
|
||||
struct type *elt_type,
|
||||
char *elt_name,
|
||||
@ -2968,6 +2972,14 @@ build_gdbtypes ()
|
||||
/* Build SIMD types. */
|
||||
builtin_type_v4sf
|
||||
= init_simd_type ("__builtin_v4sf", builtin_type_float, "f", 4);
|
||||
builtin_type_v4si
|
||||
= init_simd_type ("__builtin_v4si", builtin_type_int32, "f", 4);
|
||||
builtin_type_v8qi
|
||||
= init_simd_type ("__builtin_v8qi", builtin_type_int8, "f", 8);
|
||||
builtin_type_v4hi
|
||||
= init_simd_type ("__builtin_v4hi", builtin_type_int16, "f", 4);
|
||||
builtin_type_v2si
|
||||
= init_simd_type ("__builtin_v2si", builtin_type_int32, "f", 2);
|
||||
}
|
||||
|
||||
|
||||
@ -3007,5 +3019,9 @@ _initialize_gdbtypes ()
|
||||
register_gdbarch_swap (&builtin_type_int64, sizeof (struct type *), NULL);
|
||||
register_gdbarch_swap (&builtin_type_uint64, sizeof (struct type *), NULL);
|
||||
register_gdbarch_swap (&builtin_type_v4sf, sizeof (struct type *), NULL);
|
||||
register_gdbarch_swap (&builtin_type_v4si, sizeof (struct type *), NULL);
|
||||
register_gdbarch_swap (&builtin_type_v8qi, sizeof (struct type *), NULL);
|
||||
register_gdbarch_swap (&builtin_type_v4hi, sizeof (struct type *), NULL);
|
||||
register_gdbarch_swap (&builtin_type_v2si, sizeof (struct type *), NULL);
|
||||
register_gdbarch_swap (NULL, 0, build_gdbtypes);
|
||||
}
|
||||
|
@ -855,7 +855,13 @@ extern struct type *builtin_type_int32;
|
||||
extern struct type *builtin_type_uint32;
|
||||
extern struct type *builtin_type_int64;
|
||||
extern struct type *builtin_type_uint64;
|
||||
|
||||
/* SIMD types. We inherit these names from GCC. */
|
||||
extern struct type *builtin_type_v4sf;
|
||||
extern struct type *builtin_type_v4si;
|
||||
extern struct type *builtin_type_v8qi;
|
||||
extern struct type *builtin_type_v4hi;
|
||||
extern struct type *builtin_type_v2si;
|
||||
|
||||
/* We use this for the '/c' print format, because builtin_type_char is
|
||||
just a one-byte integral type, which languages less laid back than
|
||||
|
@ -692,7 +692,7 @@ go32_create_inferior (char *exec_file, char *args, char **env)
|
||||
error ("Syntax error in command line.");
|
||||
}
|
||||
else
|
||||
child_cmd.command = strdup (args);
|
||||
child_cmd.command = xstrdup (args);
|
||||
|
||||
cmdline = (char *) alloca (strlen (args) + 4);
|
||||
cmdline[0] = strlen (args);
|
||||
|
@ -698,6 +698,8 @@ require_notification_of_events (pid)
|
||||
#if defined(PT_SET_EVENT_MASK)
|
||||
int pt_status;
|
||||
ptrace_event_t ptrace_events;
|
||||
int nsigs;
|
||||
int signum;
|
||||
|
||||
/* Instruct the kernel as to the set of events we wish to be
|
||||
informed of. (This support does not exist before HPUX 10.0.
|
||||
@ -709,7 +711,29 @@ require_notification_of_events (pid)
|
||||
the kernel to keep certain signals hidden from us, we do it
|
||||
by calling sigdelset (ptrace_events.pe_signals, signal) for
|
||||
each such signal here, before doing PT_SET_EVENT_MASK. */
|
||||
sigemptyset (&ptrace_events.pe_signals);
|
||||
/* RM: The above comment is no longer true. We start with ignoring
|
||||
all signals, and then add the ones we are interested in. We could
|
||||
do it the other way: start by looking at all signals and then
|
||||
deleting the ones that we aren't interested in, except that
|
||||
multiple gdb signals may be mapped to the same host signal
|
||||
(eg. TARGET_SIGNAL_IO and TARGET_SIGNAL_POLL both get mapped to
|
||||
signal 22 on HPUX 10.20) We want to be notified if we are
|
||||
interested in either signal. */
|
||||
sigfillset (&ptrace_events.pe_signals);
|
||||
|
||||
/* RM: Let's not bother with signals we don't care about */
|
||||
nsigs = (int) TARGET_SIGNAL_LAST;
|
||||
for (signum = nsigs; signum > 0; signum--)
|
||||
{
|
||||
if ((signal_stop_state (signum)) ||
|
||||
(signal_print_state (signum)) ||
|
||||
(!signal_pass_state (signum)))
|
||||
{
|
||||
if (target_signal_to_host_p (signum))
|
||||
sigdelset (&ptrace_events.pe_signals,
|
||||
target_signal_to_host (signum));
|
||||
}
|
||||
}
|
||||
|
||||
ptrace_events.pe_set_event = 0;
|
||||
|
||||
|
@ -58,6 +58,13 @@ static int regmap[] =
|
||||
file may or may not define it, and even if it is defined, the
|
||||
kernel will return EIO if it's running on a pre-SSE processor.
|
||||
|
||||
PTRACE_GETXFPREGS is a Cygnus invention, since we wrote our own
|
||||
Linux kernel patch for SSE support. That patch may or may not
|
||||
actually make it into the official distribution. If you find that
|
||||
years have gone by since this stuff was added, and Linux isn't
|
||||
using PTRACE_GETXFPREGS, that means that our patch didn't make it,
|
||||
and you can delete this, and the related code.
|
||||
|
||||
My instinct is to attach this to some architecture- or
|
||||
target-specific data structure, but really, a particular GDB
|
||||
process can only run on top of one kernel at a time. So it's okay
|
||||
@ -121,7 +128,7 @@ fill_gregset (gregset_t *gregsetp,
|
||||
{
|
||||
if (regno == -1)
|
||||
convert_to_gregset (gregsetp, registers, 0);
|
||||
else
|
||||
else if (regno >= 0 && regno < NUM_GREGS)
|
||||
{
|
||||
signed char valid[NUM_GREGS];
|
||||
memset (valid, 0, sizeof (valid));
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <machine/reg.h>
|
||||
#include <machine/frame.h>
|
||||
#include "inferior.h"
|
||||
#include "gdbcore.h" /* for registers_fetched() */
|
||||
|
||||
void
|
||||
fetch_inferior_registers (regno)
|
||||
|
@ -78,6 +78,12 @@ inferior_event_handler (enum inferior_event_type event_type,
|
||||
complete_execution ();
|
||||
break;
|
||||
|
||||
case INF_EXEC_CONTINUE:
|
||||
/* Is there anything left to do for the command issued to
|
||||
complete? */
|
||||
do_all_intermediate_continuations ();
|
||||
break;
|
||||
|
||||
case INF_QUIT_REQ:
|
||||
/* FIXME: ezannoni 1999-10-04. This call should really be a
|
||||
target vector entry, so that it can be used for any kind of
|
||||
|
154
gdb/infcmd.c
154
gdb/infcmd.c
@ -88,6 +88,8 @@ static void signal_command PARAMS ((char *, int));
|
||||
static void jump_command PARAMS ((char *, int));
|
||||
|
||||
static void step_1 PARAMS ((int, int, char *));
|
||||
static void step_once (int skip_subroutines, int single_inst, int count);
|
||||
static void step_1_continuation (struct continuation_arg *arg);
|
||||
|
||||
void nexti_command PARAMS ((char *, int));
|
||||
|
||||
@ -472,11 +474,131 @@ step_1 (skip_subroutines, single_inst, count_string)
|
||||
if (!single_inst || skip_subroutines) /* leave si command alone */
|
||||
{
|
||||
enable_longjmp_breakpoint ();
|
||||
cleanups = make_cleanup ((make_cleanup_func) disable_longjmp_breakpoint,
|
||||
0);
|
||||
if (!event_loop_p || !target_can_async_p ())
|
||||
cleanups = make_cleanup ((make_cleanup_func) disable_longjmp_breakpoint,
|
||||
0);
|
||||
else
|
||||
make_exec_cleanup ((make_cleanup_func) disable_longjmp_breakpoint, 0);
|
||||
}
|
||||
|
||||
for (; count > 0; count--)
|
||||
/* In synchronous case, all is well, just use the regular for loop. */
|
||||
if (!event_loop_p || !target_can_async_p ())
|
||||
{
|
||||
for (; count > 0; count--)
|
||||
{
|
||||
clear_proceed_status ();
|
||||
|
||||
frame = get_current_frame ();
|
||||
if (!frame) /* Avoid coredump here. Why tho? */
|
||||
error ("No current frame");
|
||||
step_frame_address = FRAME_FP (frame);
|
||||
step_sp = read_sp ();
|
||||
|
||||
if (!single_inst)
|
||||
{
|
||||
find_pc_line_pc_range (stop_pc, &step_range_start, &step_range_end);
|
||||
if (step_range_end == 0)
|
||||
{
|
||||
char *name;
|
||||
if (find_pc_partial_function (stop_pc, &name, &step_range_start,
|
||||
&step_range_end) == 0)
|
||||
error ("Cannot find bounds of current function");
|
||||
|
||||
target_terminal_ours ();
|
||||
printf_filtered ("\
|
||||
Single stepping until exit from function %s, \n\
|
||||
which has no line number information.\n", name);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Say we are stepping, but stop after one insn whatever it does. */
|
||||
step_range_start = step_range_end = 1;
|
||||
if (!skip_subroutines)
|
||||
/* It is stepi.
|
||||
Don't step over function calls, not even to functions lacking
|
||||
line numbers. */
|
||||
step_over_calls = 0;
|
||||
}
|
||||
|
||||
if (skip_subroutines)
|
||||
step_over_calls = 1;
|
||||
|
||||
step_multi = (count > 1);
|
||||
proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 1);
|
||||
|
||||
if (!stop_step)
|
||||
break;
|
||||
|
||||
/* FIXME: On nexti, this may have already been done (when we hit the
|
||||
step resume break, I think). Probably this should be moved to
|
||||
wait_for_inferior (near the top). */
|
||||
#if defined (SHIFT_INST_REGS)
|
||||
SHIFT_INST_REGS ();
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!single_inst || skip_subroutines)
|
||||
do_cleanups (cleanups);
|
||||
return;
|
||||
}
|
||||
/* In case of asynchronous target things get complicated, do only
|
||||
one step for now, before returning control to the event loop. Let
|
||||
the continuation figure out how many other steps we need to do,
|
||||
and handle them one at the time, through step_once(). */
|
||||
else
|
||||
{
|
||||
if (event_loop_p && target_can_async_p ())
|
||||
step_once (skip_subroutines, single_inst, count);
|
||||
}
|
||||
}
|
||||
|
||||
/* Called after we are done with one step operation, to check whether
|
||||
we need to step again, before we print the prompt and return control
|
||||
to the user. If count is > 1, we will need to do one more call to
|
||||
proceed(), via step_once(). Basically it is like step_once and
|
||||
step_1_continuation are co-recursive. */
|
||||
static void
|
||||
step_1_continuation (arg)
|
||||
struct continuation_arg *arg;
|
||||
{
|
||||
int count;
|
||||
int skip_subroutines;
|
||||
int single_inst;
|
||||
|
||||
skip_subroutines = (int) arg->data;
|
||||
single_inst = (int) (arg->next)->data;
|
||||
count = (int) ((arg->next)->next)->data;
|
||||
|
||||
if (stop_step)
|
||||
{
|
||||
/* FIXME: On nexti, this may have already been done (when we hit the
|
||||
step resume break, I think). Probably this should be moved to
|
||||
wait_for_inferior (near the top). */
|
||||
#if defined (SHIFT_INST_REGS)
|
||||
SHIFT_INST_REGS ();
|
||||
#endif
|
||||
step_once (skip_subroutines, single_inst, count - 1);
|
||||
}
|
||||
else
|
||||
if (!single_inst || skip_subroutines)
|
||||
do_exec_cleanups (ALL_CLEANUPS);
|
||||
}
|
||||
|
||||
/* Do just one step operation. If count >1 we will have to set up a
|
||||
continuation to be done after the target stops (after this one
|
||||
step). This is useful to implement the 'step n' kind of commands, in
|
||||
case of asynchronous targets. We had to split step_1 into two parts,
|
||||
one to be done before proceed() and one afterwards. This function is
|
||||
called in case of step n with n>1, after the first step operation has
|
||||
been completed.*/
|
||||
static void
|
||||
step_once (int skip_subroutines, int single_inst, int count)
|
||||
{
|
||||
struct continuation_arg *arg1; struct continuation_arg *arg2;
|
||||
struct continuation_arg *arg3; struct frame_info *frame;
|
||||
|
||||
if (count > 0)
|
||||
{
|
||||
clear_proceed_status ();
|
||||
|
||||
@ -517,21 +639,23 @@ which has no line number information.\n", name);
|
||||
step_over_calls = 1;
|
||||
|
||||
step_multi = (count > 1);
|
||||
arg1 =
|
||||
(struct continuation_arg *) xmalloc (sizeof (struct continuation_arg));
|
||||
arg2 =
|
||||
(struct continuation_arg *) xmalloc (sizeof (struct continuation_arg));
|
||||
arg3 =
|
||||
(struct continuation_arg *) xmalloc (sizeof (struct continuation_arg));
|
||||
arg1->next = arg2;
|
||||
arg1->data = (PTR) skip_subroutines;
|
||||
arg2->next = arg3;
|
||||
arg2->data = (PTR) single_inst;
|
||||
arg3->next = NULL;
|
||||
arg3->data = (PTR) count;
|
||||
add_intermediate_continuation (step_1_continuation, arg1);
|
||||
proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 1);
|
||||
if (!stop_step)
|
||||
break;
|
||||
|
||||
/* FIXME: On nexti, this may have already been done (when we hit the
|
||||
step resume break, I think). Probably this should be moved to
|
||||
wait_for_inferior (near the top). */
|
||||
#if defined (SHIFT_INST_REGS)
|
||||
SHIFT_INST_REGS ();
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!single_inst || skip_subroutines)
|
||||
do_cleanups (cleanups);
|
||||
}
|
||||
|
||||
|
||||
/* Continue program at specified address. */
|
||||
|
||||
|
@ -52,6 +52,10 @@
|
||||
#endif
|
||||
#endif /* sgtty */
|
||||
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
#if defined (SIGIO) && defined (FASYNC) && defined (FD_SET) && defined (F_SETOWN)
|
||||
static void
|
||||
handle_sigio PARAMS ((int));
|
||||
|
@ -24,7 +24,13 @@
|
||||
#include "inferior.h"
|
||||
#include "target.h"
|
||||
#include "gdb_string.h"
|
||||
#include "wait.h"
|
||||
#ifdef HAVE_WAIT_H
|
||||
#include <wait.h>
|
||||
#else
|
||||
#ifdef HAVE_SYS_WAIT_H
|
||||
#include <sys/wait.h>
|
||||
#endif
|
||||
#endif
|
||||
#include "command.h"
|
||||
|
||||
#ifdef USG
|
||||
|
62
gdb/infrun.c
62
gdb/infrun.c
@ -270,7 +270,7 @@ static int use_thread_step_needed = USE_THREAD_STEP_NEEDED;
|
||||
#ifndef SKIP_PERMANENT_BREAKPOINT
|
||||
#define SKIP_PERMANENT_BREAKPOINT (default_skip_permanent_breakpoint)
|
||||
static void
|
||||
default_skip_permanent_breakpoint ()
|
||||
default_skip_permanent_breakpoint (void)
|
||||
{
|
||||
error_begin ();
|
||||
fprintf_filtered (gdb_stderr, "\
|
||||
@ -1341,7 +1341,10 @@ fetch_inferior_event (client_data)
|
||||
if there are any. */
|
||||
do_exec_cleanups (old_cleanups);
|
||||
normal_stop ();
|
||||
inferior_event_handler (INF_EXEC_COMPLETE, NULL);
|
||||
if (step_multi && stop_step)
|
||||
inferior_event_handler (INF_EXEC_CONTINUE, NULL);
|
||||
else
|
||||
inferior_event_handler (INF_EXEC_COMPLETE, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1351,6 +1354,7 @@ fetch_inferior_event (client_data)
|
||||
void
|
||||
init_execution_control_state (struct execution_control_state *ecs)
|
||||
{
|
||||
/* ecs->another_trap? */
|
||||
ecs->random_signal = 0;
|
||||
ecs->remove_breakpoints_on_following_step = 0;
|
||||
ecs->handling_longjmp = 0; /* FIXME */
|
||||
@ -1897,35 +1901,43 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||
/* It's a SIGTRAP or a signal we're interested in. Switch threads,
|
||||
and fall into the rest of wait_for_inferior(). */
|
||||
|
||||
/* Save infrun state for the old thread. */
|
||||
save_infrun_state (inferior_pid, prev_pc,
|
||||
prev_func_start, prev_func_name,
|
||||
trap_expected, step_resume_breakpoint,
|
||||
through_sigtramp_breakpoint,
|
||||
step_range_start, step_range_end,
|
||||
step_frame_address, ecs->handling_longjmp,
|
||||
ecs->another_trap,
|
||||
ecs->stepping_through_solib_after_catch,
|
||||
ecs->stepping_through_solib_catchpoints,
|
||||
ecs->stepping_through_sigtramp);
|
||||
/* Caution: it may happen that the new thread (or the old one!)
|
||||
is not in the thread list. In this case we must not attempt
|
||||
to "switch context", or we run the risk that our context may
|
||||
be lost. This may happen as a result of the target module
|
||||
mishandling thread creation. */
|
||||
|
||||
if (in_thread_list (inferior_pid) && in_thread_list (ecs->pid))
|
||||
{ /* Perform infrun state context switch: */
|
||||
/* Save infrun state for the old thread. */
|
||||
save_infrun_state (inferior_pid, prev_pc,
|
||||
prev_func_start, prev_func_name,
|
||||
trap_expected, step_resume_breakpoint,
|
||||
through_sigtramp_breakpoint,
|
||||
step_range_start, step_range_end,
|
||||
step_frame_address, ecs->handling_longjmp,
|
||||
ecs->another_trap,
|
||||
ecs->stepping_through_solib_after_catch,
|
||||
ecs->stepping_through_solib_catchpoints,
|
||||
ecs->stepping_through_sigtramp);
|
||||
|
||||
/* Load infrun state for the new thread. */
|
||||
load_infrun_state (ecs->pid, &prev_pc,
|
||||
&prev_func_start, &prev_func_name,
|
||||
&trap_expected, &step_resume_breakpoint,
|
||||
&through_sigtramp_breakpoint,
|
||||
&step_range_start, &step_range_end,
|
||||
&step_frame_address, &ecs->handling_longjmp,
|
||||
&ecs->another_trap,
|
||||
&ecs->stepping_through_solib_after_catch,
|
||||
&ecs->stepping_through_solib_catchpoints,
|
||||
&ecs->stepping_through_sigtramp);
|
||||
}
|
||||
if (may_switch_from_inferior_pid)
|
||||
switched_from_inferior_pid = inferior_pid;
|
||||
|
||||
inferior_pid = ecs->pid;
|
||||
|
||||
/* Load infrun state for the new thread. */
|
||||
load_infrun_state (inferior_pid, &prev_pc,
|
||||
&prev_func_start, &prev_func_name,
|
||||
&trap_expected, &step_resume_breakpoint,
|
||||
&through_sigtramp_breakpoint,
|
||||
&step_range_start, &step_range_end,
|
||||
&step_frame_address, &ecs->handling_longjmp,
|
||||
&ecs->another_trap,
|
||||
&ecs->stepping_through_solib_after_catch,
|
||||
&ecs->stepping_through_solib_catchpoints,
|
||||
&ecs->stepping_through_sigtramp);
|
||||
|
||||
if (context_hook)
|
||||
context_hook (pid_to_thread_id (ecs->pid));
|
||||
|
||||
|
@ -281,7 +281,7 @@ java_type_print_base (type, stream, show, level)
|
||||
DMGL_ANSI | DMGL_PARAMS | DMGL_JAVA);
|
||||
|
||||
if (demangled_name == NULL)
|
||||
demangled_name = strdup (mangled_name);
|
||||
demangled_name = xstrdup (mangled_name);
|
||||
|
||||
{
|
||||
char *demangled_no_class;
|
||||
|
@ -85,7 +85,7 @@ cisco_kod_open (kod_display_callback_ftype *display_func,
|
||||
|
||||
/* Return name, version, and description. I hope we have enough
|
||||
space. */
|
||||
return (strdup ("gdbkodcisco v0.0.0 - Cisco Kernel Object Display"));
|
||||
return (xstrdup ("gdbkodcisco v0.0.0 - Cisco Kernel Object Display"));
|
||||
}
|
||||
|
||||
/* Close the connection. */
|
||||
|
@ -145,7 +145,7 @@ kod_set_os (char *arg, int from_tty, struct cmd_list_element *command)
|
||||
delete_cmd (old_operating_system, &infolist);
|
||||
free (old_operating_system);
|
||||
}
|
||||
old_operating_system = strdup (operating_system);
|
||||
old_operating_system = xstrdup (operating_system);
|
||||
|
||||
if (! operating_system || ! *operating_system)
|
||||
{
|
||||
|
311
gdb/mips-tdep.c
311
gdb/mips-tdep.c
@ -35,6 +35,9 @@
|
||||
#include "target.h"
|
||||
|
||||
#include "opcode/mips.h"
|
||||
#include "elf/mips.h"
|
||||
#include "elf-bfd.h"
|
||||
|
||||
|
||||
struct frame_extra_info
|
||||
{
|
||||
@ -70,6 +73,56 @@ static enum mips_fpu_type mips_fpu_type = MIPS_DEFAULT_FPU_TYPE;
|
||||
#endif
|
||||
|
||||
|
||||
/* MIPS specific per-architecture information */
|
||||
struct gdbarch_tdep
|
||||
{
|
||||
/* from the elf header */
|
||||
int elf_flags;
|
||||
/* mips options */
|
||||
int mips_eabi;
|
||||
enum mips_fpu_type mips_fpu_type;
|
||||
int mips_last_arg_regnum;
|
||||
int mips_last_fp_arg_regnum;
|
||||
int mips_saved_regsize;
|
||||
int mips_fp_register_double;
|
||||
};
|
||||
|
||||
#if GDB_MULTI_ARCH
|
||||
#undef MIPS_EABI
|
||||
#define MIPS_EABI (gdbarch_tdep (current_gdbarch)->mips_eabi)
|
||||
#endif
|
||||
|
||||
#if GDB_MULTI_ARCH
|
||||
#undef MIPS_LAST_FP_ARG_REGNUM
|
||||
#define MIPS_LAST_FP_ARG_REGNUM (gdbarch_tdep (current_gdbarch)->mips_last_fp_arg_regnum)
|
||||
#endif
|
||||
|
||||
#if GDB_MULTI_ARCH
|
||||
#undef MIPS_LAST_ARG_REGNUM
|
||||
#define MIPS_LAST_ARG_REGNUM (gdbarch_tdep (current_gdbarch)->mips_last_arg_regnum)
|
||||
#endif
|
||||
|
||||
#if GDB_MULTI_ARCH
|
||||
#undef MIPS_FPU_TYPE
|
||||
#define MIPS_FPU_TYPE (gdbarch_tdep (current_gdbarch)->mips_fpu_type)
|
||||
#endif
|
||||
|
||||
#if GDB_MULTI_ARCH
|
||||
#undef MIPS_SAVED_REGSIZE
|
||||
#define MIPS_SAVED_REGSIZE (gdbarch_tdep (current_gdbarch)->mips_saved_regsize)
|
||||
#endif
|
||||
|
||||
/* Indicate that the ABI makes use of double-precision registers
|
||||
provided by the FPU (rather than combining pairs of registers to
|
||||
form double-precision values). Do not use "TARGET_IS_MIPS64" to
|
||||
determine if the ABI is using double-precision registers. See also
|
||||
MIPS_FPU_TYPE. */
|
||||
#if GDB_MULTI_ARCH
|
||||
#undef FP_REGISTER_DOUBLE
|
||||
#define FP_REGISTER_DOUBLE (gdbarch_tdep (current_gdbarch)->mips_fp_register_double)
|
||||
#endif
|
||||
|
||||
|
||||
#define VM_MIN_ADDRESS (CORE_ADDR)0x400000
|
||||
|
||||
#if 0
|
||||
@ -3130,6 +3183,10 @@ set_mipsfpu_single_command (args, from_tty)
|
||||
{
|
||||
mips_fpu_type = MIPS_FPU_SINGLE;
|
||||
mips_fpu_type_auto = 0;
|
||||
if (GDB_MULTI_ARCH)
|
||||
{
|
||||
gdbarch_tdep (current_gdbarch)->mips_fpu_type = MIPS_FPU_SINGLE;
|
||||
}
|
||||
}
|
||||
|
||||
static void set_mipsfpu_double_command PARAMS ((char *, int));
|
||||
@ -3140,6 +3197,10 @@ set_mipsfpu_double_command (args, from_tty)
|
||||
{
|
||||
mips_fpu_type = MIPS_FPU_DOUBLE;
|
||||
mips_fpu_type_auto = 0;
|
||||
if (GDB_MULTI_ARCH)
|
||||
{
|
||||
gdbarch_tdep (current_gdbarch)->mips_fpu_type = MIPS_FPU_DOUBLE;
|
||||
}
|
||||
}
|
||||
|
||||
static void set_mipsfpu_none_command PARAMS ((char *, int));
|
||||
@ -3150,6 +3211,10 @@ set_mipsfpu_none_command (args, from_tty)
|
||||
{
|
||||
mips_fpu_type = MIPS_FPU_NONE;
|
||||
mips_fpu_type_auto = 0;
|
||||
if (GDB_MULTI_ARCH)
|
||||
{
|
||||
gdbarch_tdep (current_gdbarch)->mips_fpu_type = MIPS_FPU_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
static void set_mipsfpu_auto_command PARAMS ((char *, int));
|
||||
@ -3565,12 +3630,256 @@ mips_call_dummy_address ()
|
||||
|
||||
|
||||
|
||||
static gdbarch_init_ftype mips_gdbarch_init;
|
||||
static struct gdbarch *
|
||||
mips_gdbarch_init (info, arches)
|
||||
struct gdbarch_info info;
|
||||
struct gdbarch_list *arches;
|
||||
{
|
||||
static LONGEST mips_call_dummy_words[] =
|
||||
{0};
|
||||
struct gdbarch *gdbarch;
|
||||
struct gdbarch_tdep *tdep;
|
||||
int elf_flags;
|
||||
char *ef_mips_abi;
|
||||
int ef_mips_bitptrs;
|
||||
int ef_mips_arch;
|
||||
|
||||
/* Extract the elf_flags if available */
|
||||
if (info.abfd != NULL
|
||||
&& bfd_get_flavour (info.abfd) == bfd_target_elf_flavour)
|
||||
elf_flags = elf_elfheader (info.abfd)->e_flags;
|
||||
else
|
||||
elf_flags = 0;
|
||||
|
||||
/* try to find a pre-existing architecture */
|
||||
for (arches = gdbarch_list_lookup_by_info (arches, &info);
|
||||
arches != NULL;
|
||||
arches = gdbarch_list_lookup_by_info (arches->next, &info))
|
||||
{
|
||||
/* MIPS needs to be pedantic about which ABI the object is
|
||||
using. */
|
||||
if (gdbarch_tdep (current_gdbarch)->elf_flags != elf_flags)
|
||||
continue;
|
||||
return arches->gdbarch;
|
||||
}
|
||||
|
||||
/* Need a new architecture. Fill in a target specific vector. */
|
||||
tdep = (struct gdbarch_tdep *) xmalloc (sizeof (struct gdbarch_tdep));
|
||||
gdbarch = gdbarch_alloc (&info, tdep);
|
||||
tdep->elf_flags = elf_flags;
|
||||
|
||||
/* Initially set everything according to the ABI. */
|
||||
set_gdbarch_short_bit (gdbarch, 16);
|
||||
set_gdbarch_int_bit (gdbarch, 32);
|
||||
set_gdbarch_float_bit (gdbarch, 32);
|
||||
set_gdbarch_double_bit (gdbarch, 64);
|
||||
set_gdbarch_long_double_bit (gdbarch, 64);
|
||||
switch ((elf_flags & EF_MIPS_ABI))
|
||||
{
|
||||
case E_MIPS_ABI_O32:
|
||||
ef_mips_abi = "o32";
|
||||
tdep->mips_eabi = 0;
|
||||
tdep->mips_saved_regsize = 4;
|
||||
tdep->mips_fp_register_double = 0;
|
||||
set_gdbarch_long_bit (gdbarch, 32);
|
||||
set_gdbarch_ptr_bit (gdbarch, 32);
|
||||
set_gdbarch_long_long_bit (gdbarch, 64);
|
||||
break;
|
||||
case E_MIPS_ABI_O64:
|
||||
ef_mips_abi = "o64";
|
||||
tdep->mips_eabi = 0;
|
||||
tdep->mips_saved_regsize = 8;
|
||||
tdep->mips_fp_register_double = 1;
|
||||
set_gdbarch_long_bit (gdbarch, 32);
|
||||
set_gdbarch_ptr_bit (gdbarch, 32);
|
||||
set_gdbarch_long_long_bit (gdbarch, 64);
|
||||
break;
|
||||
case E_MIPS_ABI_EABI32:
|
||||
ef_mips_abi = "eabi32";
|
||||
tdep->mips_eabi = 1;
|
||||
tdep->mips_saved_regsize = 4;
|
||||
tdep->mips_fp_register_double = 0;
|
||||
set_gdbarch_long_bit (gdbarch, 32);
|
||||
set_gdbarch_ptr_bit (gdbarch, 32);
|
||||
set_gdbarch_long_long_bit (gdbarch, 64);
|
||||
break;
|
||||
case E_MIPS_ABI_EABI64:
|
||||
ef_mips_abi = "eabi64";
|
||||
tdep->mips_eabi = 1;
|
||||
tdep->mips_saved_regsize = 8;
|
||||
tdep->mips_fp_register_double = 1;
|
||||
set_gdbarch_long_bit (gdbarch, 64);
|
||||
set_gdbarch_ptr_bit (gdbarch, 64);
|
||||
set_gdbarch_long_long_bit (gdbarch, 64);
|
||||
break;
|
||||
default:
|
||||
ef_mips_abi = "default";
|
||||
tdep->mips_eabi = 0;
|
||||
tdep->mips_saved_regsize = MIPS_REGSIZE;
|
||||
tdep->mips_fp_register_double = (REGISTER_VIRTUAL_SIZE (FP0_REGNUM) == 8);
|
||||
set_gdbarch_long_bit (gdbarch, 32);
|
||||
set_gdbarch_ptr_bit (gdbarch, 32);
|
||||
set_gdbarch_long_long_bit (gdbarch, 64);
|
||||
break;
|
||||
}
|
||||
|
||||
/* determine the ISA */
|
||||
switch (elf_flags & EF_MIPS_ARCH)
|
||||
{
|
||||
case E_MIPS_ARCH_1:
|
||||
ef_mips_arch = 1;
|
||||
break;
|
||||
case E_MIPS_ARCH_2:
|
||||
ef_mips_arch = 2;
|
||||
break;
|
||||
case E_MIPS_ARCH_3:
|
||||
ef_mips_arch = 3;
|
||||
break;
|
||||
case E_MIPS_ARCH_4:
|
||||
ef_mips_arch = 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* determine the size of a pointer */
|
||||
if ((elf_flags & EF_MIPS_32BITPTRS))
|
||||
{
|
||||
ef_mips_bitptrs = 32;
|
||||
}
|
||||
else if ((elf_flags & EF_MIPS_64BITPTRS))
|
||||
{
|
||||
ef_mips_bitptrs = 64;
|
||||
}
|
||||
else
|
||||
{
|
||||
ef_mips_bitptrs = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Select either of the two alternative ABI's */
|
||||
if (tdep->mips_eabi)
|
||||
{
|
||||
/* EABI uses R4 through R11 for args */
|
||||
tdep->mips_last_arg_regnum = 11;
|
||||
/* EABI uses F12 through F19 for args */
|
||||
tdep->mips_last_fp_arg_regnum = FP0_REGNUM + 19;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* old ABI uses R4 through R7 for args */
|
||||
tdep->mips_last_arg_regnum = 7;
|
||||
/* old ABI uses F12 through F15 for args */
|
||||
tdep->mips_last_fp_arg_regnum = FP0_REGNUM + 15;
|
||||
}
|
||||
|
||||
/* enable/disable the MIPS FPU */
|
||||
if (!mips_fpu_type_auto)
|
||||
tdep->mips_fpu_type = mips_fpu_type;
|
||||
else if (info.bfd_arch_info != NULL
|
||||
&& info.bfd_arch_info->arch == bfd_arch_mips)
|
||||
switch (info.bfd_arch_info->mach)
|
||||
{
|
||||
case bfd_mach_mips4100:
|
||||
tdep->mips_fpu_type = MIPS_FPU_NONE;
|
||||
break;
|
||||
default:
|
||||
tdep->mips_fpu_type = MIPS_FPU_DOUBLE;
|
||||
break;
|
||||
}
|
||||
else
|
||||
tdep->mips_fpu_type = MIPS_FPU_DOUBLE;
|
||||
|
||||
/* MIPS version of register names. NOTE: At present the MIPS
|
||||
register name management is part way between the old -
|
||||
#undef/#define REGISTER_NAMES and the new REGISTER_NAME(nr).
|
||||
Further work on it is required. */
|
||||
set_gdbarch_register_name (gdbarch, mips_register_name);
|
||||
set_gdbarch_read_pc (gdbarch, generic_target_read_pc);
|
||||
set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
|
||||
set_gdbarch_read_fp (gdbarch, generic_target_read_fp);
|
||||
set_gdbarch_write_fp (gdbarch, generic_target_write_fp);
|
||||
set_gdbarch_read_sp (gdbarch, generic_target_read_sp);
|
||||
set_gdbarch_write_sp (gdbarch, generic_target_write_sp);
|
||||
|
||||
/* Initialize a frame */
|
||||
set_gdbarch_init_extra_frame_info (gdbarch, mips_init_extra_frame_info);
|
||||
|
||||
/* MIPS version of CALL_DUMMY */
|
||||
|
||||
set_gdbarch_call_dummy_p (gdbarch, 1);
|
||||
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
|
||||
set_gdbarch_use_generic_dummy_frames (gdbarch, 0);
|
||||
set_gdbarch_call_dummy_location (gdbarch, AT_ENTRY_POINT);
|
||||
set_gdbarch_call_dummy_address (gdbarch, mips_call_dummy_address);
|
||||
set_gdbarch_call_dummy_start_offset (gdbarch, 0);
|
||||
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
|
||||
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
|
||||
set_gdbarch_call_dummy_length (gdbarch, 0);
|
||||
set_gdbarch_pc_in_call_dummy (gdbarch, pc_in_call_dummy_at_entry_point);
|
||||
set_gdbarch_call_dummy_words (gdbarch, mips_call_dummy_words);
|
||||
set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (mips_call_dummy_words));
|
||||
set_gdbarch_push_return_address (gdbarch, mips_push_return_address);
|
||||
set_gdbarch_push_arguments (gdbarch, mips_push_arguments);
|
||||
set_gdbarch_register_convertible (gdbarch, generic_register_convertible_not);
|
||||
|
||||
set_gdbarch_frame_chain_valid (gdbarch, default_frame_chain_valid);
|
||||
set_gdbarch_get_saved_register (gdbarch, default_get_saved_register);
|
||||
|
||||
if (gdbarch_debug)
|
||||
{
|
||||
fprintf_unfiltered (gdb_stderr,
|
||||
"mips_gdbarch_init: (info)elf_flags = 0x%x\n",
|
||||
elf_flags);
|
||||
fprintf_unfiltered (gdb_stderr,
|
||||
"mips_gdbarch_init: (info)ef_mips_abi = %s\n",
|
||||
ef_mips_abi);
|
||||
fprintf_unfiltered (gdb_stderr,
|
||||
"mips_gdbarch_init: (info)ef_mips_arch = %d\n",
|
||||
ef_mips_arch);
|
||||
fprintf_unfiltered (gdb_stderr,
|
||||
"mips_gdbarch_init: (info)ef_mips_bitptrs = %d\n",
|
||||
ef_mips_bitptrs);
|
||||
fprintf_unfiltered (gdb_stderr,
|
||||
"mips_gdbarch_init: MIPS_EABI = %d\n",
|
||||
tdep->mips_eabi);
|
||||
fprintf_unfiltered (gdb_stderr,
|
||||
"mips_gdbarch_init: MIPS_LAST_ARG_REGNUM = %d\n",
|
||||
tdep->mips_last_arg_regnum);
|
||||
fprintf_unfiltered (gdb_stderr,
|
||||
"mips_gdbarch_init: MIPS_LAST_FP_ARG_REGNUM = %d (%d)\n",
|
||||
tdep->mips_last_fp_arg_regnum,
|
||||
tdep->mips_last_fp_arg_regnum - FP0_REGNUM);
|
||||
fprintf_unfiltered (gdb_stderr,
|
||||
"mips_gdbarch_init: tdep->mips_fpu_type = %d (%s)\n",
|
||||
tdep->mips_fpu_type,
|
||||
(tdep->mips_fpu_type == MIPS_FPU_NONE ? "none"
|
||||
: tdep->mips_fpu_type == MIPS_FPU_SINGLE ? "single"
|
||||
: tdep->mips_fpu_type == MIPS_FPU_DOUBLE ? "double"
|
||||
: "???"));
|
||||
fprintf_unfiltered (gdb_stderr,
|
||||
"mips_gdbarch_init: tdep->mips_saved_regsize = %d\n",
|
||||
tdep->mips_saved_regsize);
|
||||
fprintf_unfiltered (gdb_stderr,
|
||||
"mips_gdbarch_init: tdep->mips_fp_register_double = %d (%s)\n",
|
||||
tdep->mips_fp_register_double,
|
||||
(tdep->mips_fp_register_double ? "true" : "false"));
|
||||
}
|
||||
|
||||
return gdbarch;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_initialize_mips_tdep ()
|
||||
{
|
||||
static struct cmd_list_element *mipsfpulist = NULL;
|
||||
struct cmd_list_element *c;
|
||||
|
||||
if (GDB_MULTI_ARCH)
|
||||
register_gdbarch_init (bfd_arch_mips, mips_gdbarch_init);
|
||||
if (!tm_print_insn) /* Someone may have already set it */
|
||||
tm_print_insn = gdb_print_insn_mips;
|
||||
|
||||
@ -3602,6 +3911,7 @@ _initialize_mips_tdep ()
|
||||
"Show current use of MIPS floating-point coprocessor target.",
|
||||
&showlist);
|
||||
|
||||
#if !GDB_MULTI_ARCH
|
||||
c = add_set_cmd ("processor", class_support, var_string_noescape,
|
||||
(char *) &tmp_mips_processor_type,
|
||||
"Set the type of MIPS processor in use.\n\
|
||||
@ -3614,6 +3924,7 @@ Set this to be able to access processor-type-specific registers.\n\
|
||||
|
||||
tmp_mips_processor_type = strsave (DEFAULT_MIPS_TYPE);
|
||||
mips_set_processor_type_command (strsave (DEFAULT_MIPS_TYPE), 0);
|
||||
#endif
|
||||
|
||||
/* We really would like to have both "0" and "unlimited" work, but
|
||||
command.c doesn't deal with that. So make it a var_zinteger
|
||||
|
@ -49,6 +49,13 @@ static char *mn10300_generic_register_names[] =
|
||||
"", "", "", "", "", "", "", "fp"};
|
||||
|
||||
static char **mn10300_register_names = mn10300_generic_register_names;
|
||||
static char *am33_register_names[] =
|
||||
{
|
||||
"d0", "d1", "d2", "d3", "a0", "a1", "a2", "a3",
|
||||
"sp", "pc", "mdr", "psw", "lir", "lar", "",
|
||||
"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
|
||||
"ssp", "msp", "usp", "mcrh", "mcrl", "mcvf", "", "", ""};
|
||||
static int am33_mode;
|
||||
|
||||
char *
|
||||
mn10300_register_name (i)
|
||||
@ -205,6 +212,13 @@ set_movm_offsets (fi, movm_args)
|
||||
fi->saved_regs[D2_REGNUM] = fi->frame + offset;
|
||||
offset += 4;
|
||||
}
|
||||
if (am33_mode && movm_args & 0x02)
|
||||
{
|
||||
fi->saved_regs[E0_REGNUM + 5] = fi->frame + offset;
|
||||
fi->saved_regs[E0_REGNUM + 4] = fi->frame + offset + 4;
|
||||
fi->saved_regs[E0_REGNUM + 3] = fi->frame + offset + 8;
|
||||
fi->saved_regs[E0_REGNUM + 2] = fi->frame + offset + 12;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -550,6 +564,13 @@ mn10300_frame_chain (fi)
|
||||
adjust += (fi->saved_regs[D3_REGNUM] ? 4 : 0);
|
||||
adjust += (fi->saved_regs[A2_REGNUM] ? 4 : 0);
|
||||
adjust += (fi->saved_regs[A3_REGNUM] ? 4 : 0);
|
||||
if (am33_mode)
|
||||
{
|
||||
adjust += (fi->saved_regs[E0_REGNUM + 5] ? 4 : 0);
|
||||
adjust += (fi->saved_regs[E0_REGNUM + 4] ? 4 : 0);
|
||||
adjust += (fi->saved_regs[E0_REGNUM + 3] ? 4 : 0);
|
||||
adjust += (fi->saved_regs[E0_REGNUM + 2] ? 4 : 0);
|
||||
}
|
||||
|
||||
/* Our caller does not have a frame pointer. So his frame starts
|
||||
at the base of our frame (fi->frame) + register save space
|
||||
@ -740,6 +761,13 @@ mn10300_frame_saved_pc (fi)
|
||||
adjust += (fi->saved_regs[D3_REGNUM] ? 4 : 0);
|
||||
adjust += (fi->saved_regs[A2_REGNUM] ? 4 : 0);
|
||||
adjust += (fi->saved_regs[A3_REGNUM] ? 4 : 0);
|
||||
if (am33_mode)
|
||||
{
|
||||
adjust += (fi->saved_regs[E0_REGNUM + 5] ? 4 : 0);
|
||||
adjust += (fi->saved_regs[E0_REGNUM + 4] ? 4 : 0);
|
||||
adjust += (fi->saved_regs[E0_REGNUM + 3] ? 4 : 0);
|
||||
adjust += (fi->saved_regs[E0_REGNUM + 2] ? 4 : 0);
|
||||
}
|
||||
|
||||
return (read_memory_integer (fi->frame + adjust, REGISTER_SIZE));
|
||||
}
|
||||
@ -815,6 +843,13 @@ set_machine_hook (filename)
|
||||
mn10300_register_names = mn10300_generic_register_names;
|
||||
}
|
||||
|
||||
am33_mode = 0;
|
||||
if (bfd_get_mach (exec_bfd) == bfd_mach_am33)
|
||||
{
|
||||
|
||||
mn10300_register_names = am33_register_names;
|
||||
am33_mode = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -486,7 +486,7 @@ free_objfile (objfile)
|
||||
if (objfile->static_psymbols.list)
|
||||
mfree (objfile->md, objfile->static_psymbols.list);
|
||||
/* Free the obstacks for non-reusable objfiles */
|
||||
obstack_free (&objfile->psymbol_cache.cache, 0);
|
||||
free_bcache (&objfile->psymbol_cache);
|
||||
obstack_free (&objfile->psymbol_obstack, 0);
|
||||
obstack_free (&objfile->symbol_obstack, 0);
|
||||
obstack_free (&objfile->type_obstack, 0);
|
||||
|
@ -236,7 +236,7 @@ device is attached to the remote system (e.g. /dev/ttya).");
|
||||
|
||||
/* split name after whitespace, pass tail as arg to open command */
|
||||
|
||||
devName = strdup (name);
|
||||
devName = xstrdup (name);
|
||||
p = strchr (devName, ' ');
|
||||
if (p)
|
||||
{
|
||||
@ -1011,7 +1011,7 @@ rdilogfile_command (char *arg, int from_tty)
|
||||
if (log_filename)
|
||||
free (log_filename);
|
||||
|
||||
log_filename = strdup (arg);
|
||||
log_filename = xstrdup (arg);
|
||||
|
||||
Adp_SetLogfile (log_filename);
|
||||
}
|
||||
@ -1050,7 +1050,7 @@ _initialize_remote_rdi ()
|
||||
init_rdi_ops ();
|
||||
add_target (&arm_rdi_ops);
|
||||
|
||||
log_filename = strdup ("rdi.log");
|
||||
log_filename = xstrdup ("rdi.log");
|
||||
Adp_SetLogfile (log_filename);
|
||||
Adp_SetLogEnable (log_enable);
|
||||
|
||||
|
223
gdb/remote.c
223
gdb/remote.c
@ -112,7 +112,7 @@ static void extended_remote_async_create_inferior PARAMS ((char *, char *, char
|
||||
|
||||
static void remote_mourn_1 PARAMS ((struct target_ops *));
|
||||
|
||||
static void remote_send PARAMS ((char *buf));
|
||||
static void remote_send (char *buf, long sizeof_buf);
|
||||
|
||||
static int readchar PARAMS ((int timeout));
|
||||
|
||||
@ -139,7 +139,7 @@ static int remote_thread_alive PARAMS ((int));
|
||||
|
||||
static void get_offsets PARAMS ((void));
|
||||
|
||||
static int read_frame PARAMS ((char *));
|
||||
static long read_frame (char *buf, long sizeof_buf);
|
||||
|
||||
static int remote_insert_breakpoint PARAMS ((CORE_ADDR, char *));
|
||||
|
||||
@ -497,9 +497,14 @@ register_remote_packet_sizes (void)
|
||||
static void
|
||||
build_remote_packet_sizes (void)
|
||||
{
|
||||
/* Maximum number of characters in a packet. This default m68k-stub.c and
|
||||
i386-stub.c stubs. */
|
||||
remote_packet_size = 400;
|
||||
/* Default maximum number of characters in a packet body. Many
|
||||
remote stubs have a hardwired buffer size of 400 bytes
|
||||
(c.f. BUFMAX in m68k-stub.c and i386-stub.c). BUFMAX-1 is used
|
||||
as the maximum packet-size to ensure that the packet and an extra
|
||||
NUL character can always fit in the buffer. This stops GDB
|
||||
trashing stubs that try to squeeze an extra NUL into what is
|
||||
already a full buffer (As of 1999-12-04 that was most stubs. */
|
||||
remote_packet_size = 400 - 1;
|
||||
/* Should REGISTER_BYTES needs more space than the default, adjust
|
||||
the size accordingly. Remember that each byte is encoded as two
|
||||
characters. 32 is the overhead for the packet header /
|
||||
@ -782,7 +787,7 @@ set_thread (th, gen)
|
||||
else
|
||||
sprintf (&buf[2], "%x", th);
|
||||
putpkt (buf);
|
||||
getpkt (buf, 0);
|
||||
getpkt (buf, PBUFSIZ, 0);
|
||||
if (gen)
|
||||
general_thread = th;
|
||||
else
|
||||
@ -802,7 +807,7 @@ remote_thread_alive (tid)
|
||||
else
|
||||
sprintf (buf, "T%08x", tid);
|
||||
putpkt (buf);
|
||||
getpkt (buf, 0);
|
||||
getpkt (buf, sizeof (buf), 0);
|
||||
return (buf[0] == 'O' && buf[1] == 'K');
|
||||
}
|
||||
|
||||
@ -1342,7 +1347,7 @@ remote_get_threadinfo (threadid, fieldset, info)
|
||||
|
||||
pack_threadinfo_request (threadinfo_pkt, fieldset, threadid);
|
||||
putpkt (threadinfo_pkt);
|
||||
getpkt (threadinfo_pkt, 0);
|
||||
getpkt (threadinfo_pkt, PBUFSIZ, 0);
|
||||
result = remote_unpack_thread_info_response (threadinfo_pkt + 2, threadid,
|
||||
info);
|
||||
return result;
|
||||
@ -1436,7 +1441,7 @@ remote_get_threadlist (startflag, nextthread, result_limit,
|
||||
pack_threadlist_request (threadlist_packet,
|
||||
startflag, result_limit, nextthread);
|
||||
putpkt (threadlist_packet);
|
||||
getpkt (t_response, 0);
|
||||
getpkt (t_response, PBUFSIZ, 0);
|
||||
|
||||
*result_count =
|
||||
parse_threadlist_response (t_response + 2, result_limit, &echo_nextthread,
|
||||
@ -1549,7 +1554,7 @@ remote_current_thread (oldpid)
|
||||
char *buf = alloca (PBUFSIZ);
|
||||
|
||||
putpkt ("qC");
|
||||
getpkt (buf, 0);
|
||||
getpkt (buf, PBUFSIZ, 0);
|
||||
if (buf[0] == 'Q' && buf[1] == 'C')
|
||||
return strtol (&buf[2], NULL, 16);
|
||||
else
|
||||
@ -1578,7 +1583,8 @@ remote_threads_info (void)
|
||||
error ("Command can only be used when connected to the remote target.");
|
||||
|
||||
putpkt ("qfThreadInfo");
|
||||
getpkt (bufp = buf, 0);
|
||||
bufp = buf;
|
||||
getpkt (bufp, PBUFSIZ, 0);
|
||||
if (bufp[0] == '\0') /* q packet not recognized! */
|
||||
{ /* try old jmetzler method */
|
||||
remote_find_new_threads ();
|
||||
@ -1595,7 +1601,8 @@ remote_threads_info (void)
|
||||
}
|
||||
while (*bufp++ == ','); /* comma-separated list */
|
||||
putpkt ("qsThreadInfo");
|
||||
getpkt (bufp = buf, 0);
|
||||
bufp = buf;
|
||||
getpkt (bufp, PBUFSIZ, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1616,7 +1623,7 @@ extended_remote_restart ()
|
||||
/* Now query for status so this looks just like we restarted
|
||||
gdbserver from scratch. */
|
||||
putpkt ("?");
|
||||
getpkt (buf, 0);
|
||||
getpkt (buf, PBUFSIZ, 0);
|
||||
}
|
||||
|
||||
/* Clean up connection to a remote debugger. */
|
||||
@ -1644,7 +1651,7 @@ get_offsets ()
|
||||
|
||||
putpkt ("qOffsets");
|
||||
|
||||
getpkt (buf, 0);
|
||||
getpkt (buf, PBUFSIZ, 0);
|
||||
|
||||
if (buf[0] == '\000')
|
||||
return; /* Return silently. Stub doesn't support
|
||||
@ -1728,14 +1735,12 @@ get_offsets ()
|
||||
*/
|
||||
|
||||
static int
|
||||
remote_cisco_section_offsets (text_addr, data_addr, bss_addr,
|
||||
text_offs, data_offs, bss_offs)
|
||||
bfd_vma text_addr;
|
||||
bfd_vma data_addr;
|
||||
bfd_vma bss_addr;
|
||||
bfd_signed_vma *text_offs;
|
||||
bfd_signed_vma *data_offs;
|
||||
bfd_signed_vma *bss_offs;
|
||||
remote_cisco_section_offsets (bfd_vma text_addr,
|
||||
bfd_vma data_addr,
|
||||
bfd_vma bss_addr,
|
||||
bfd_signed_vma *text_offs,
|
||||
bfd_signed_vma *data_offs,
|
||||
bfd_signed_vma *bss_offs)
|
||||
{
|
||||
bfd_vma text_base, data_base, bss_base;
|
||||
struct minimal_symbol *start;
|
||||
@ -1835,8 +1840,7 @@ remote_cisco_objfile_relocate (text_off, data_off, bss_off)
|
||||
/* Stub for catch_errors. */
|
||||
|
||||
static int
|
||||
remote_start_remote_dummy (dummy)
|
||||
char *dummy;
|
||||
remote_start_remote_dummy (void *dummy)
|
||||
{
|
||||
start_remote (); /* Initialize gdb process mechanisms */
|
||||
return 1;
|
||||
@ -1989,7 +1993,7 @@ serial device is attached to the remote system (e.g. /dev/ttya).");
|
||||
/* tell the remote that we're using the extended protocol. */
|
||||
char *buf = alloca (PBUFSIZ);
|
||||
putpkt ("!");
|
||||
getpkt (buf, 0);
|
||||
getpkt (buf, PBUFSIZ, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2088,7 +2092,7 @@ serial device is attached to the remote system (e.g. /dev/ttya).");
|
||||
/* tell the remote that we're using the extended protocol. */
|
||||
char *buf = alloca (PBUFSIZ);
|
||||
putpkt ("!");
|
||||
getpkt (buf, 0);
|
||||
getpkt (buf, PBUFSIZ, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2109,7 +2113,7 @@ remote_detach (args, from_tty)
|
||||
|
||||
/* Tell the remote target to detach. */
|
||||
strcpy (buf, "D");
|
||||
remote_send (buf);
|
||||
remote_send (buf, PBUFSIZ);
|
||||
|
||||
pop_target ();
|
||||
if (from_tty)
|
||||
@ -2130,7 +2134,7 @@ remote_async_detach (args, from_tty)
|
||||
|
||||
/* Tell the remote target to detach. */
|
||||
strcpy (buf, "D");
|
||||
remote_send (buf);
|
||||
remote_send (buf, PBUFSIZ);
|
||||
|
||||
/* Unregister the file descriptor from the event loop. */
|
||||
if (SERIAL_IS_ASYNC_P (remote_desc))
|
||||
@ -2490,7 +2494,7 @@ remote_wait (pid, status)
|
||||
unsigned char *p;
|
||||
|
||||
ofunc = signal (SIGINT, remote_interrupt);
|
||||
getpkt ((char *) buf, 1);
|
||||
getpkt (buf, PBUFSIZ, 1);
|
||||
signal (SIGINT, ofunc);
|
||||
|
||||
/* This is a hook for when we need to do something (perhaps the
|
||||
@ -2712,7 +2716,7 @@ remote_async_wait (pid, status)
|
||||
_never_ wait for ever -> test on target_is_async_p().
|
||||
However, before we do that we need to ensure that the caller
|
||||
knows how to take the target into/out of async mode. */
|
||||
getpkt ((char *) buf, wait_forever_enabled_p);
|
||||
getpkt (buf, PBUFSIZ, wait_forever_enabled_p);
|
||||
if (!SERIAL_IS_ASYNC_P (remote_desc))
|
||||
signal (SIGINT, ofunc);
|
||||
|
||||
@ -2933,7 +2937,7 @@ remote_fetch_registers (regno)
|
||||
set_thread (inferior_pid, 1);
|
||||
|
||||
sprintf (buf, "g");
|
||||
remote_send (buf);
|
||||
remote_send (buf, PBUFSIZ);
|
||||
|
||||
/* Save the size of the packet sent to us by the target. Its used
|
||||
as a heuristic when determining the max size of packets that the
|
||||
@ -2954,7 +2958,7 @@ remote_fetch_registers (regno)
|
||||
if (remote_debug)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"Bad register packet; fetching a new packet\n");
|
||||
getpkt (buf, 0);
|
||||
getpkt (buf, PBUFSIZ, 0);
|
||||
}
|
||||
|
||||
/* Reply describes registers byte by byte, each byte encoded as two
|
||||
@ -3021,8 +3025,7 @@ remote_prepare_to_store ()
|
||||
packet was not recognized. */
|
||||
|
||||
static int
|
||||
store_register_using_P (regno)
|
||||
int regno;
|
||||
store_register_using_P (int regno)
|
||||
{
|
||||
/* Try storing a single register. */
|
||||
char *buf = alloca (PBUFSIZ);
|
||||
@ -3039,7 +3042,7 @@ store_register_using_P (regno)
|
||||
*p++ = tohex (regp[i] & 0xf);
|
||||
}
|
||||
*p = '\0';
|
||||
remote_send (buf);
|
||||
remote_send (buf, PBUFSIZ);
|
||||
|
||||
return buf[0] != '\0';
|
||||
}
|
||||
@ -3101,7 +3104,7 @@ remote_store_registers (regno)
|
||||
}
|
||||
*p = '\0';
|
||||
|
||||
remote_send (buf);
|
||||
remote_send (buf, PBUFSIZ);
|
||||
}
|
||||
|
||||
/* Use of the data cache *used* to be disabled because it loses for looking
|
||||
@ -3239,7 +3242,7 @@ check_binary_download (addr)
|
||||
*p = '\0';
|
||||
|
||||
putpkt_binary (buf, (int) (p - buf));
|
||||
getpkt (buf, 0);
|
||||
getpkt (buf, PBUFSIZ, 0);
|
||||
|
||||
if (buf[0] == '\0')
|
||||
{
|
||||
@ -3276,6 +3279,7 @@ remote_write_bytes (CORE_ADDR memaddr, char *myaddr, int len)
|
||||
int max_buf_size; /* Max size of packet output buffer */
|
||||
unsigned char *p;
|
||||
unsigned char *plen;
|
||||
long sizeof_buf;
|
||||
int plenlen;
|
||||
int todo;
|
||||
int nr_bytes;
|
||||
@ -3285,7 +3289,8 @@ remote_write_bytes (CORE_ADDR memaddr, char *myaddr, int len)
|
||||
|
||||
/* Determine the max packet size. */
|
||||
max_buf_size = get_memory_write_packet_size ();
|
||||
buf = alloca (max_buf_size + 1);
|
||||
sizeof_buf = max_buf_size + 1; /* Space for trailing NUL */
|
||||
buf = alloca (sizeof_buf);
|
||||
|
||||
/* Subtract header overhead from max payload size - $M<memaddr>,<len>:#nn */
|
||||
max_buf_size -= 2 + hexnumlen (memaddr + len - 1) + 1 + hexnumlen (len) + 4;
|
||||
@ -3377,7 +3382,7 @@ remote_write_bytes (CORE_ADDR memaddr, char *myaddr, int len)
|
||||
}
|
||||
|
||||
putpkt_binary (buf, (int) (p - buf));
|
||||
getpkt (buf, 0);
|
||||
getpkt (buf, sizeof_buf, 0);
|
||||
|
||||
if (buf[0] == 'E')
|
||||
{
|
||||
@ -3417,11 +3422,13 @@ remote_read_bytes (memaddr, myaddr, len)
|
||||
{
|
||||
char *buf;
|
||||
int max_buf_size; /* Max size of packet output buffer */
|
||||
long sizeof_buf;
|
||||
int origlen;
|
||||
|
||||
/* Create a buffer big enough for this packet. */
|
||||
max_buf_size = get_memory_read_packet_size ();
|
||||
buf = alloca (max_buf_size);
|
||||
sizeof_buf = max_buf_size + 1; /* Space for trailing NUL */
|
||||
buf = alloca (sizeof_buf);
|
||||
|
||||
origlen = len;
|
||||
while (len > 0)
|
||||
@ -3443,7 +3450,7 @@ remote_read_bytes (memaddr, myaddr, len)
|
||||
*p = '\0';
|
||||
|
||||
putpkt (buf);
|
||||
getpkt (buf, 0);
|
||||
getpkt (buf, sizeof_buf, 0);
|
||||
|
||||
if (buf[0] == 'E')
|
||||
{
|
||||
@ -3534,7 +3541,7 @@ remote_search (len, data, mask, startaddr, increment, lorange, hirange
|
||||
data_long = extract_unsigned_integer (data, len);
|
||||
sprintf (buf, "t%x:%x,%x", startaddr, data_long, mask_long);
|
||||
putpkt (buf);
|
||||
getpkt (buf, 0);
|
||||
getpkt (buf, PBUFSIZ, 0);
|
||||
if (buf[0] == '\0')
|
||||
{
|
||||
/* The stub doesn't support the 't' request. We might want to
|
||||
@ -3621,11 +3628,11 @@ readchar (timeout)
|
||||
into BUF. Report an error if we get an error reply. */
|
||||
|
||||
static void
|
||||
remote_send (buf)
|
||||
char *buf;
|
||||
remote_send (char *buf,
|
||||
long sizeof_buf)
|
||||
{
|
||||
putpkt (buf);
|
||||
getpkt (buf, 0);
|
||||
getpkt (buf, sizeof_buf, 0);
|
||||
|
||||
if (buf[0] == 'E')
|
||||
error ("Remote failure reply: %s", buf);
|
||||
@ -3663,7 +3670,8 @@ putpkt_binary (buf, cnt)
|
||||
int i;
|
||||
unsigned char csum = 0;
|
||||
char *buf2 = alloca (cnt + 6);
|
||||
char *junkbuf = alloca (PBUFSIZ);
|
||||
long sizeof_junkbuf = PBUFSIZ;
|
||||
char *junkbuf = alloca (sizeof_junkbuf);
|
||||
|
||||
int ch;
|
||||
int tcount = 0;
|
||||
@ -3736,7 +3744,7 @@ putpkt_binary (buf, cnt)
|
||||
{
|
||||
/* It's probably an old response, and we're out of sync.
|
||||
Just gobble up the packet and ignore it. */
|
||||
getpkt (junkbuf, 0);
|
||||
getpkt (junkbuf, sizeof_junkbuf, 0);
|
||||
continue; /* Now, go look for + */
|
||||
}
|
||||
default:
|
||||
@ -3773,45 +3781,50 @@ static int remote_cisco_mode;
|
||||
|
||||
/* Come here after finding the start of the frame. Collect the rest
|
||||
into BUF, verifying the checksum, length, and handling run-length
|
||||
compression. Returns 0 on any error, 1 on success. */
|
||||
compression. No more than sizeof_buf-1 characters are read so that
|
||||
the buffer can be NUL terminated.
|
||||
|
||||
static int
|
||||
read_frame (buf)
|
||||
char *buf;
|
||||
Returns -1 on error, number of characters in buffer (ignoring the
|
||||
trailing NULL) on success. (could be extended to return one of the
|
||||
SERIAL status indications). */
|
||||
|
||||
static long
|
||||
read_frame (char *buf,
|
||||
long sizeof_buf)
|
||||
{
|
||||
unsigned char csum;
|
||||
char *bp;
|
||||
long bc;
|
||||
int c;
|
||||
|
||||
csum = 0;
|
||||
bp = buf;
|
||||
bc = 0;
|
||||
|
||||
while (1)
|
||||
{
|
||||
/* ASSERT (bc < sizeof_buf - 1) - space for trailing NUL */
|
||||
c = readchar (remote_timeout);
|
||||
|
||||
switch (c)
|
||||
{
|
||||
case SERIAL_TIMEOUT:
|
||||
if (remote_debug)
|
||||
fputs_filtered ("Timeout in mid-packet, retrying\n", gdb_stdlog);
|
||||
return 0;
|
||||
return -1;
|
||||
case '$':
|
||||
if (remote_debug)
|
||||
fputs_filtered ("Saw new packet start in middle of old one\n",
|
||||
gdb_stdlog);
|
||||
return 0; /* Start a new packet, count retries */
|
||||
return -1; /* Start a new packet, count retries */
|
||||
case '#':
|
||||
{
|
||||
unsigned char pktcsum;
|
||||
|
||||
*bp = '\000';
|
||||
buf[bc] = '\0';
|
||||
|
||||
pktcsum = fromhex (readchar (remote_timeout)) << 4;
|
||||
pktcsum |= fromhex (readchar (remote_timeout));
|
||||
|
||||
if (csum == pktcsum)
|
||||
return 1;
|
||||
return bc;
|
||||
|
||||
if (remote_debug)
|
||||
{
|
||||
@ -3821,7 +3834,9 @@ read_frame (buf)
|
||||
fputs_filtered (buf, gdb_stdlog);
|
||||
fputs_filtered ("\n", gdb_stdlog);
|
||||
}
|
||||
return 0;
|
||||
/* Number of characters in buffer ignoring trailing
|
||||
NUL. */
|
||||
return -1;
|
||||
}
|
||||
case '*': /* Run length encoding */
|
||||
{
|
||||
@ -3847,47 +3862,50 @@ read_frame (buf)
|
||||
repeat += fromhex (c);
|
||||
}
|
||||
|
||||
/* The character before ``*'' is repeated. */
|
||||
|
||||
if (repeat > 0 && repeat <= 255
|
||||
&& bp + repeat - 1 < buf + PBUFSIZ - 1)
|
||||
&& bc > 0
|
||||
&& bc + repeat < sizeof_buf - 1)
|
||||
{
|
||||
memset (bp, *(bp - 1), repeat);
|
||||
bp += c;
|
||||
memset (&buf[bc], buf[bc - 1], repeat);
|
||||
bc += repeat;
|
||||
continue;
|
||||
}
|
||||
|
||||
*bp = '\0';
|
||||
buf[bc] = '\0';
|
||||
printf_filtered ("Repeat count %d too large for buffer: ", repeat);
|
||||
puts_filtered (buf);
|
||||
puts_filtered ("\n");
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
default:
|
||||
if (bp < buf + PBUFSIZ - 1)
|
||||
if (bc < sizeof_buf - 1)
|
||||
{
|
||||
*bp++ = c;
|
||||
buf[bc++] = c;
|
||||
csum += c;
|
||||
continue;
|
||||
}
|
||||
|
||||
*bp = '\0';
|
||||
buf[bc] = '\0';
|
||||
puts_filtered ("Remote packet too long: ");
|
||||
puts_filtered (buf);
|
||||
puts_filtered ("\n");
|
||||
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Read a packet from the remote machine, with error checking, and
|
||||
store it in BUF. BUF is expected to be of size PBUFSIZ. If
|
||||
FOREVER, wait forever rather than timing out; this is used while
|
||||
the target is executing user code. */
|
||||
store it in BUF. If FOREVER, wait forever rather than timing out;
|
||||
this is used (in synchronous mode) to wait for a target that is is
|
||||
executing user code to stop. */
|
||||
|
||||
void
|
||||
getpkt (buf, forever)
|
||||
char *buf;
|
||||
int forever;
|
||||
getpkt (char *buf,
|
||||
long sizeof_buf,
|
||||
int forever)
|
||||
{
|
||||
int c;
|
||||
int tries;
|
||||
@ -3937,9 +3955,9 @@ getpkt (buf, forever)
|
||||
|
||||
/* We've found the start of a packet, now collect the data. */
|
||||
|
||||
val = read_frame (buf);
|
||||
val = read_frame (buf, sizeof_buf);
|
||||
|
||||
if (val == 1)
|
||||
if (val >= 0)
|
||||
{
|
||||
if (remote_debug)
|
||||
{
|
||||
@ -4171,7 +4189,7 @@ remote_insert_breakpoint (addr, contents_cache)
|
||||
sprintf (p, ",%d", bp_size);
|
||||
|
||||
putpkt (buf);
|
||||
getpkt (buf, 0);
|
||||
getpkt (buf, PBUFSIZ, 0);
|
||||
|
||||
if (buf[0] != '\0')
|
||||
{
|
||||
@ -4236,7 +4254,7 @@ remote_remove_breakpoint (addr, contents_cache)
|
||||
sprintf (p, ",%d", bp_size);
|
||||
|
||||
putpkt (buf);
|
||||
getpkt (buf, 0);
|
||||
getpkt (buf, PBUFSIZ, 0);
|
||||
|
||||
return (buf[0] == 'E');
|
||||
}
|
||||
@ -4268,7 +4286,7 @@ remote_insert_watchpoint (addr, len, type)
|
||||
sprintf (p, ",%x", len);
|
||||
|
||||
putpkt (buf);
|
||||
getpkt (buf, 0);
|
||||
getpkt (buf, PBUFSIZ, 0);
|
||||
|
||||
if (buf[0] == '\0' || buf [0] == 'E')
|
||||
return -1;
|
||||
@ -4291,7 +4309,7 @@ remote_remove_watchpoint (addr, len, type)
|
||||
p += hexnumstr (p, (ULONGEST) addr);
|
||||
sprintf (p, ",%x", len);
|
||||
putpkt (buf);
|
||||
getpkt (buf, 0);
|
||||
getpkt (buf, PBUFSIZ, 0);
|
||||
|
||||
if (buf[0] == '\0' || buf [0] == 'E')
|
||||
return -1;
|
||||
@ -4319,7 +4337,7 @@ remote_insert_hw_breakpoint (addr, len)
|
||||
*p = '\0';
|
||||
|
||||
putpkt (buf);
|
||||
getpkt (buf, 0);
|
||||
getpkt (buf, PBUFSIZ, 0);
|
||||
|
||||
if (buf[0] == '\0' || buf [0] == 'E')
|
||||
return -1;
|
||||
@ -4344,7 +4362,7 @@ remote_remove_hw_breakpoint (addr, len)
|
||||
*p = '\0';
|
||||
|
||||
putpkt(buf);
|
||||
getpkt (buf, 0);
|
||||
getpkt (buf, PBUFSIZ, 0);
|
||||
|
||||
if (buf[0] == '\0' || buf [0] == 'E')
|
||||
return -1;
|
||||
@ -4481,7 +4499,7 @@ compare_sections_command (args, from_tty)
|
||||
bfd_get_section_contents (exec_bfd, s, sectdata, 0, size);
|
||||
host_crc = crc32 ((unsigned char *) sectdata, size, 0xffffffff);
|
||||
|
||||
getpkt (buf, 0);
|
||||
getpkt (buf, PBUFSIZ, 0);
|
||||
if (buf[0] == 'E')
|
||||
error ("target memory fault, section %s, range 0x%08x -- 0x%08x",
|
||||
sectname, lma, lma + size);
|
||||
@ -4575,7 +4593,7 @@ remote_query (query_type, buf, outbuf, bufsiz)
|
||||
if (i < 0)
|
||||
return i;
|
||||
|
||||
getpkt (outbuf, 0);
|
||||
getpkt (outbuf, *bufsiz, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -4618,7 +4636,7 @@ remote_rcmd (char *command,
|
||||
{
|
||||
/* XXX - see also tracepoint.c:remote_get_noisy_reply() */
|
||||
buf[0] = '\0';
|
||||
getpkt (buf, 0);
|
||||
getpkt (buf, PBUFSIZ, 0);
|
||||
if (buf[0] == '\0')
|
||||
error ("Target does not support this command\n");
|
||||
if (buf[0] == 'O' && buf[1] != 'K')
|
||||
@ -4660,7 +4678,7 @@ packet_command (args, from_tty)
|
||||
puts_filtered ("\n");
|
||||
putpkt (args);
|
||||
|
||||
getpkt (buf, 0);
|
||||
getpkt (buf, PBUFSIZ, 0);
|
||||
puts_filtered ("received: ");
|
||||
print_packet (buf);
|
||||
puts_filtered ("\n");
|
||||
@ -4900,9 +4918,7 @@ Specify the serial device it is connected to (e.g. /dev/ttya).",
|
||||
*/
|
||||
|
||||
static void
|
||||
remote_info_process (args, from_tty)
|
||||
char *args;
|
||||
int from_tty;
|
||||
remote_info_process (char *args, int from_tty)
|
||||
{
|
||||
char *buf = alloca (PBUFSIZ);
|
||||
|
||||
@ -4910,7 +4926,7 @@ remote_info_process (args, from_tty)
|
||||
error ("Command can only be used when connected to the remote target.");
|
||||
|
||||
putpkt ("qfProcessInfo");
|
||||
getpkt (buf, 0);
|
||||
getpkt (buf, PBUFSIZ, 0);
|
||||
if (buf[0] == 0)
|
||||
return; /* Silently: target does not support this feature. */
|
||||
|
||||
@ -4921,7 +4937,7 @@ remote_info_process (args, from_tty)
|
||||
{
|
||||
remote_console_output (&buf[1]);
|
||||
putpkt ("qsProcessInfo");
|
||||
getpkt (buf, 0);
|
||||
getpkt (buf, PBUFSIZ, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4930,9 +4946,7 @@ remote_info_process (args, from_tty)
|
||||
*/
|
||||
|
||||
static void
|
||||
remote_cisco_open (name, from_tty)
|
||||
char *name;
|
||||
int from_tty;
|
||||
remote_cisco_open (char *name, int from_tty)
|
||||
{
|
||||
if (name == 0)
|
||||
error (
|
||||
@ -5012,8 +5026,7 @@ device is attached to the remote system (e.g. host:port).");
|
||||
}
|
||||
|
||||
static void
|
||||
remote_cisco_close (quitting)
|
||||
int quitting;
|
||||
remote_cisco_close (int quitting)
|
||||
{
|
||||
remote_cisco_mode = 0;
|
||||
remote_close (quitting);
|
||||
@ -5043,7 +5056,7 @@ static int echo_check;
|
||||
extern int quit_flag;
|
||||
|
||||
static int
|
||||
readsocket ()
|
||||
readsocket (void)
|
||||
{
|
||||
int data;
|
||||
|
||||
@ -5110,7 +5123,7 @@ readsocket ()
|
||||
}
|
||||
|
||||
static int
|
||||
readtty ()
|
||||
readtty (void)
|
||||
{
|
||||
int tty_bytecount;
|
||||
|
||||
@ -5150,7 +5163,7 @@ readtty ()
|
||||
}
|
||||
|
||||
static int
|
||||
minitelnet ()
|
||||
minitelnet (void)
|
||||
{
|
||||
fd_set input; /* file descriptors for select */
|
||||
int tablesize; /* max number of FDs for select */
|
||||
@ -5233,9 +5246,7 @@ minitelnet ()
|
||||
}
|
||||
|
||||
static int
|
||||
remote_cisco_wait (pid, status)
|
||||
int pid;
|
||||
struct target_waitstatus *status;
|
||||
remote_cisco_wait (int pid, struct target_waitstatus *status)
|
||||
{
|
||||
if (minitelnet () != ENTER_DEBUG)
|
||||
{
|
||||
@ -5329,7 +5340,7 @@ remote_async (void (*callback) (enum inferior_event_type event_type, void *conte
|
||||
target. */
|
||||
|
||||
static void
|
||||
init_remote_async_ops ()
|
||||
init_remote_async_ops (void)
|
||||
{
|
||||
remote_async_ops.to_shortname = "async";
|
||||
remote_async_ops.to_longname = "Remote serial target in async version of the gdb-specific protocol";
|
||||
@ -5375,7 +5386,7 @@ Specify the serial device it is connected to (e.g. /dev/ttya).";
|
||||
remote vector and adding to it. */
|
||||
|
||||
static void
|
||||
init_extended_async_remote_ops ()
|
||||
init_extended_async_remote_ops (void)
|
||||
{
|
||||
extended_async_remote_ops = remote_async_ops;
|
||||
|
||||
@ -5391,9 +5402,7 @@ Specify the serial device it is connected to (e.g. /dev/ttya).",
|
||||
}
|
||||
|
||||
static void
|
||||
set_remote_cmd (args, from_tty)
|
||||
char *args;
|
||||
int from_tty;
|
||||
set_remote_cmd (char *args, int from_tty)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -28,7 +28,7 @@
|
||||
FOREVER, wait forever rather than timing out; this is used while
|
||||
the target is executing user code. */
|
||||
|
||||
extern void getpkt (char *buf, int forever);
|
||||
extern void getpkt (char *buf, long sizeof_buf, int forever);
|
||||
|
||||
/* Send a packet to the remote machine, with error checking. The data
|
||||
of the packet is in BUF. The string in BUF can be at most PBUFSIZ
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include <sys/socket.h>
|
||||
#include <sys/time.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "signals.h"
|
||||
|
||||
|
@ -91,7 +91,7 @@ static char *
|
||||
static struct type *
|
||||
dbx_alloc_type PARAMS ((int[2], struct objfile *));
|
||||
|
||||
static LONGEST read_huge_number PARAMS ((char **, int, int *));
|
||||
static long read_huge_number PARAMS ((char **, int, int *));
|
||||
|
||||
static struct type *error_type PARAMS ((char **, struct objfile *));
|
||||
|
||||
@ -4480,7 +4480,7 @@ read_sun_floating_type (pp, typenums, objfile)
|
||||
|
||||
If encounter garbage, set *BITS to -1 and return 0. */
|
||||
|
||||
static LONGEST
|
||||
static long
|
||||
read_huge_number (pp, end, bits)
|
||||
char **pp;
|
||||
int end;
|
||||
@ -4488,12 +4488,12 @@ read_huge_number (pp, end, bits)
|
||||
{
|
||||
char *p = *pp;
|
||||
int sign = 1;
|
||||
LONGEST n = 0;
|
||||
long n = 0;
|
||||
int radix = 10;
|
||||
char overflow = 0;
|
||||
int nbits = 0;
|
||||
int c;
|
||||
LONGEST upper_limit;
|
||||
long upper_limit;
|
||||
|
||||
if (*p == '-')
|
||||
{
|
||||
@ -4510,9 +4510,9 @@ read_huge_number (pp, end, bits)
|
||||
}
|
||||
|
||||
if (os9k_stabs)
|
||||
upper_limit = ULONGEST_MAX / radix;
|
||||
upper_limit = ULONG_MAX / radix;
|
||||
else
|
||||
upper_limit = LONGEST_MAX / radix;
|
||||
upper_limit = LONG_MAX / radix;
|
||||
|
||||
while ((c = *p++) >= '0' && c < ('0' + radix))
|
||||
{
|
||||
@ -4593,7 +4593,7 @@ read_range_type (pp, typenums, objfile)
|
||||
{
|
||||
char *orig_pp = *pp;
|
||||
int rangenums[2];
|
||||
LONGEST n2, n3;
|
||||
long n2, n3;
|
||||
int n2bits, n3bits;
|
||||
int self_subrange;
|
||||
struct type *result_type;
|
||||
@ -4646,8 +4646,8 @@ read_range_type (pp, typenums, objfile)
|
||||
fit in a long but <large number>-1 does. */
|
||||
else if ((n2bits != 0 && n3bits != 0 && n2bits == n3bits + 1)
|
||||
|| (n2bits != 0 && n3bits == 0
|
||||
&& (n2bits == sizeof (LONGEST) * HOST_CHAR_BIT)
|
||||
&& n3 == LONGEST_MAX))
|
||||
&& (n2bits == sizeof (long) * HOST_CHAR_BIT)
|
||||
&& n3 == LONG_MAX))
|
||||
{
|
||||
got_signed = 1;
|
||||
nbits = n2bits;
|
||||
|
@ -64,6 +64,11 @@ extern int hp_cxx_exception_support_initialized;
|
||||
#endif
|
||||
|
||||
int (*ui_load_progress_hook) (const char *section, unsigned long num);
|
||||
void (*show_load_progress) (const char *section,
|
||||
unsigned long section_sent,
|
||||
unsigned long section_size,
|
||||
unsigned long total_sent,
|
||||
unsigned long total_size);
|
||||
void (*pre_add_symbol_hook) PARAMS ((char *));
|
||||
void (*post_add_symbol_hook) PARAMS ((void));
|
||||
void (*target_new_objfile_hook) PARAMS ((struct objfile *));
|
||||
@ -1225,6 +1230,8 @@ generic_load (char *args, int from_tty)
|
||||
char *filename;
|
||||
struct cleanup *old_cleanups;
|
||||
char *offptr;
|
||||
CORE_ADDR total_size = 0;
|
||||
CORE_ADDR total_sent = 0;
|
||||
|
||||
/* Parse the input argument - the user can specify a load offset as
|
||||
a second argument. */
|
||||
@ -1262,6 +1269,10 @@ generic_load (char *args, int from_tty)
|
||||
bfd_errmsg (bfd_get_error ()));
|
||||
}
|
||||
|
||||
for (s = loadfile_bfd->sections; s; s = s->next)
|
||||
if (s->flags & SEC_LOAD)
|
||||
total_size += bfd_get_section_size_before_reloc (s);
|
||||
|
||||
start_time = time (NULL);
|
||||
|
||||
for (s = loadfile_bfd->sections; s; s = s->next)
|
||||
@ -1331,10 +1342,14 @@ generic_load (char *args, int from_tty)
|
||||
buffer += len;
|
||||
write_count += 1;
|
||||
sent += len;
|
||||
total_sent += len;
|
||||
if (quit_flag
|
||||
|| (ui_load_progress_hook != NULL
|
||||
&& ui_load_progress_hook (sect_name, sent)))
|
||||
error ("Canceled the download");
|
||||
|
||||
if (show_load_progress != NULL)
|
||||
show_load_progress (sect_name, sent, size, total_sent, total_size);
|
||||
}
|
||||
while (sent < size);
|
||||
|
||||
@ -1435,7 +1450,7 @@ add_symbol_file_command (args, from_tty)
|
||||
|
||||
/* Make a copy of the string that we can safely write into. */
|
||||
|
||||
args = strdup (args);
|
||||
args = xstrdup (args);
|
||||
make_cleanup (free, args);
|
||||
|
||||
/* Ensure section_addrs is initialized */
|
||||
@ -1560,7 +1575,7 @@ add_symbol_file_command (args, from_tty)
|
||||
text data or bss section. This is redundent but
|
||||
eventually, none will be given special treatment */
|
||||
{
|
||||
section_addrs.other[sec_num].name = strdup (sec);
|
||||
section_addrs.other[sec_num].name = xstrdup (sec);
|
||||
make_cleanup (free, section_addrs.other[sec_num].name);
|
||||
section_addrs.other[sec_num++].addr = addr;
|
||||
printf_filtered ("\t%s_addr = %s\n",
|
||||
@ -1715,9 +1730,7 @@ reread_symbols ()
|
||||
sizeof (objfile->static_psymbols));
|
||||
|
||||
/* Free the obstacks for non-reusable objfiles */
|
||||
obstack_free (&objfile->psymbol_cache.cache, 0);
|
||||
memset (&objfile->psymbol_cache, 0,
|
||||
sizeof (objfile->psymbol_cache));
|
||||
free_bcache (&objfile->psymbol_cache);
|
||||
obstack_free (&objfile->psymbol_obstack, 0);
|
||||
obstack_free (&objfile->symbol_obstack, 0);
|
||||
obstack_free (&objfile->type_obstack, 0);
|
||||
|
34
gdb/target.c
34
gdb/target.c
@ -1675,10 +1675,16 @@ target_signal_from_host (hostsig)
|
||||
return TARGET_SIGNAL_UNKNOWN;
|
||||
}
|
||||
|
||||
int
|
||||
target_signal_to_host (oursig)
|
||||
enum target_signal oursig;
|
||||
/* Convert a OURSIG (an enum target_signal) to the form used by the
|
||||
target operating system (refered to as the ``host'') or zero if the
|
||||
equivalent host signal is not available. Set/clear OURSIG_OK
|
||||
accordingly. */
|
||||
|
||||
static int
|
||||
do_target_signal_to_host (enum target_signal oursig,
|
||||
int *oursig_ok)
|
||||
{
|
||||
*oursig_ok = 1;
|
||||
switch (oursig)
|
||||
{
|
||||
case TARGET_SIGNAL_0:
|
||||
@ -1913,12 +1919,34 @@ target_signal_to_host (oursig)
|
||||
return retsig;
|
||||
}
|
||||
#endif
|
||||
*oursig_ok = 0;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
target_signal_to_host_p (enum target_signal oursig)
|
||||
{
|
||||
int oursig_ok;
|
||||
do_target_signal_to_host (oursig, &oursig_ok);
|
||||
return oursig_ok;
|
||||
}
|
||||
|
||||
int
|
||||
target_signal_to_host (enum target_signal oursig)
|
||||
{
|
||||
int oursig_ok;
|
||||
int targ_signo = do_target_signal_to_host (oursig, &oursig_ok);
|
||||
if (!oursig_ok)
|
||||
{
|
||||
/* The user might be trying to do "signal SIGSAK" where this system
|
||||
doesn't have SIGSAK. */
|
||||
warning ("Signal %s does not exist on this system.\n",
|
||||
target_signal_to_name (oursig));
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
return targ_signo;
|
||||
}
|
||||
|
||||
/* Helper function for child_wait and the Lynx derivatives of child_wait.
|
||||
|
25
gdb/target.h
25
gdb/target.h
@ -278,7 +278,12 @@ enum inferior_event_type
|
||||
/* We are called because a timer went off. */
|
||||
INF_TIMER,
|
||||
/* We are called to do stuff after the inferior stops. */
|
||||
INF_EXEC_COMPLETE
|
||||
INF_EXEC_COMPLETE,
|
||||
/* We are called to do some stuff after the inferior stops, but we
|
||||
are expected to reenter the proceed() and
|
||||
handle_inferior_event() functions. This is used only in case of
|
||||
'step n' like commands. */
|
||||
INF_EXEC_CONTINUE
|
||||
};
|
||||
|
||||
/* Return the string for a signal. */
|
||||
@ -1343,7 +1348,23 @@ extern asection *target_memory_bfd_section;
|
||||
/* This is for native targets which use a unix/POSIX-style waitstatus. */
|
||||
extern void store_waitstatus PARAMS ((struct target_waitstatus *, int));
|
||||
|
||||
/* Convert between host signal numbers and enum target_signal's. */
|
||||
/* Predicate to target_signal_to_host(). Return non-zero if the enum
|
||||
targ_signal SIGNO has an equivalent ``host'' representation. */
|
||||
/* FIXME: cagney/1999-11-22: The name below was chosen in preference
|
||||
to the shorter target_signal_p() because it is far less ambigious.
|
||||
In this context ``target_signal'' refers to GDB's internal
|
||||
representation of the target's set of signals while ``host signal''
|
||||
refers to the target operating system's signal. Confused? */
|
||||
extern int target_signal_to_host_p (enum target_signal signo);
|
||||
|
||||
/* Convert between host signal numbers and enum target_signal's.
|
||||
target_signal_to_host() returns 0 and prints a warning() on GDB's
|
||||
console if SIGNO has no equivalent host representation. */
|
||||
/* FIXME: cagney/1999-11-22: Here ``host'' is used incorrectly, it is
|
||||
refering to the target operating system's signal numbering.
|
||||
Similarly, ``enum target_signal'' is named incorrectly, ``enum
|
||||
gdb_signal'' would probably be better as it is refering to GDB's
|
||||
internal representation of a target operating system's signal. */
|
||||
extern enum target_signal target_signal_from_host PARAMS ((int));
|
||||
extern int target_signal_to_host PARAMS ((enum target_signal));
|
||||
|
||||
|
@ -1,3 +1,65 @@
|
||||
Sat Dec 4 15:21:18 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* gdb.base/remote.c: Fill the buffer with truely random data.
|
||||
Change the buffer type to ``unsigned char'' to simplify size
|
||||
arithmetic.
|
||||
|
||||
* gdb.base/remote.exp: Reduce download numbers by one. Typical
|
||||
stub only handles 400-1 byte packets. Verify that the download
|
||||
worked.
|
||||
|
||||
1999-11-30 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* lib/gdb.exp (gdb_expect_list): FAIL only once on multiple pattern
|
||||
tests, using UNRESOLVED for the untested cases. Also, does not wait
|
||||
for a timeout if the prompt was received before a recognizable pattern.
|
||||
|
||||
1999-11-29 Fernando Nasser <fnasser@totem.to.cygnus.com>
|
||||
|
||||
* lib/gdb.exp (gdb_expect_list): Fix spelling.
|
||||
|
||||
1999-11-29 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
* gdb.base/watchpoint.exp: Add tests cases for the hit count of
|
||||
watchpoints.
|
||||
|
||||
1999-11-24 Jason Merrill <jason@casey.cygnus.com>
|
||||
|
||||
* gdb.base/condbreak.exp: Add missing '$gdb_prompt $'.
|
||||
|
||||
* gdb.c++/local.exp: Be more flexible in recognizing local class
|
||||
name mangling. Don't allow horribly truncated method names.
|
||||
* gdb.c++/derivation.exp: Expect protected inheritance.
|
||||
* gdb.c++/inherit.exp: Be more flexible in recognizing vbase pointers.
|
||||
* gdb.c++/virtfunc.exp: Likewise.
|
||||
* gdb.c++/classes.exp: Likewise. Don't require the enclosing scope
|
||||
when printing a nested enum.
|
||||
|
||||
1999-11-22 Jim Blandy <jimb@cygnus.com>
|
||||
|
||||
* gdb.base/step-test.exp: Properly await GDB's response to setting
|
||||
a breakpoint on the call to large_struct_by_value.
|
||||
|
||||
* gdb.base/ending-run.exp ("step to end of run 1"): Don't fail
|
||||
just because we have debug info for the `start' function.
|
||||
|
||||
1999-11-19 Jim Blandy <jimb@zenia.red-bean.com>
|
||||
|
||||
* gdb.threads/linux-dp.exp ("create philosopher"): Recognize the
|
||||
"Unknown signal" messages, which indicate (on LinuxThreads) that
|
||||
GDB doesn't know how to debug threads on this system. This is
|
||||
better than hanging while philosopher 0 dumps chatter into gdb.log.
|
||||
|
||||
1999-11-18 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* gdb.trace/deltrace.exp: Updated test to reflect new error text.
|
||||
|
||||
1999-11-18 Fred Fish <fnf@cygnus.com>
|
||||
|
||||
* gdb.base/coremaker2.c: Add sample program for generating
|
||||
cores that is more self contained than coremaker.c. Eventually
|
||||
I'll add more code to this and tie it into the testsuite.
|
||||
|
||||
1999-11-12 Stan Shebs <shebs@andros.cygnus.com>
|
||||
|
||||
* gdb.base/dollar.exp: Remove, now in gdb.hp.
|
||||
@ -84,7 +146,6 @@ Mon Oct 11 13:57:21 1999 Andrew Cagney <cagney@amy.cygnus.com>
|
||||
attempt a start more than three times. Check return value from
|
||||
gdb_load.
|
||||
|
||||
|
||||
Wed Oct 6 12:05:58 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* gdb.base/watchpoint.exp: Match fail ``finish from marker1'' with
|
||||
@ -1332,6 +1393,17 @@ Fri Sep 11 13:58:02 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
|
||||
|
||||
* gdb.base/setshow.exp: Fix error introduced by call to runto_main.
|
||||
|
||||
Fri Jul 24 15:51:34 1998 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* gdb.disasm/am33.s: Add tests for autoincrement instructions.
|
||||
* gdb.disasm/am33.exp: Run time. Update tests which use r8-r15
|
||||
to use a0-a3/d0-d3 as needed.
|
||||
|
||||
Thu Jul 16 18:20:46 1998 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* gdb.disasm/am33.s: Add 4 operand mul and mulu tests.
|
||||
* gdb.disasm/am33.exp: Corresponding changes.
|
||||
|
||||
1998-07-11 Felix Lee <flee@cygnus.com>
|
||||
|
||||
* gdb.base/callfuncs.exp: add cmp10 test.
|
||||
@ -1350,12 +1422,22 @@ Fri Jun 26 14:52:47 1998 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
|
||||
* gdb.base/scope.exp: Remove extraneous newline in filelocal_bss
|
||||
before run test.
|
||||
|
||||
Fri Jun 26 11:12:17 1998 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* am33.exp: Just compile, do not link the testcase.
|
||||
* am33.s: Add ".am33" pseudoop to force am33 mode.
|
||||
|
||||
1998-06-25 Felix Lee <flee@cygnus.com>
|
||||
|
||||
* gdb.base/setshow.exp: make sure $pc is sane.
|
||||
|
||||
* gdb.stabs/weird.exp: split expect patterns properly.
|
||||
|
||||
Wed Jun 24 13:03:15 1998 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* gdb.disasm/am33.s: New disassembler testfile for the am33.
|
||||
* gdb.disasm/am33.exp: Run it.
|
||||
|
||||
Tue Jun 23 11:45:01 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
|
||||
|
||||
* gdb.base/funcargs.exp: simplify expect strings to ease pattern
|
||||
|
@ -182,10 +182,10 @@ gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.
|
||||
# Until the Dwarf2 writer gets fixed, I'm going to XFAIL its behavior.
|
||||
send_gdb "continue\n"
|
||||
gdb_expect {
|
||||
-re "Continuing\\..*Breakpoint \[0-9\]+, marker1 \\(\\) at .*$srcfile:4\[38\].*4\[38\]\[\t \]+.*" {
|
||||
-re "Continuing\\..*Breakpoint \[0-9\]+, marker1 \\(\\) at .*$srcfile:4\[38\].*4\[38\]\[\t \]+.*$gdb_prompt $" {
|
||||
pass "run until breakpoint at marker1"
|
||||
}
|
||||
-re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker1 \\(\\) at .*$srcfile:4\[38\].*4\[38\]\[\t \]+.*" {
|
||||
-re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker1 \\(\\) at .*$srcfile:4\[38\].*4\[38\]\[\t \]+.*$gdb_prompt $" {
|
||||
xfail "run until breakpoint at marker1"
|
||||
}
|
||||
-re "$gdb_prompt $" {
|
||||
|
58
gdb/testsuite/gdb.base/coremaker2.c
Normal file
58
gdb/testsuite/gdb.base/coremaker2.c
Normal file
@ -0,0 +1,58 @@
|
||||
/* Simple little program that just generates a core dump from inside some
|
||||
nested function calls. Keep this as self contained as possible, I.E.
|
||||
use no environment resources other than possibly abort(). */
|
||||
|
||||
#ifndef __STDC__
|
||||
#define const /**/
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_ABORT
|
||||
#define HAVE_ABORT 1
|
||||
#endif
|
||||
|
||||
#if HAVE_ABORT
|
||||
#define ABORT abort()
|
||||
#else
|
||||
#define ABORT {char *invalid = 0; *invalid = 0xFF;}
|
||||
#endif
|
||||
|
||||
/* Don't make these automatic vars or we will have to walk back up the
|
||||
stack to access them. */
|
||||
|
||||
char *buf1;
|
||||
char *buf2;
|
||||
|
||||
int coremaker_data = 1; /* In Data section */
|
||||
int coremaker_bss; /* In BSS section */
|
||||
|
||||
const int coremaker_ro = 201; /* In Read-Only Data section */
|
||||
|
||||
void
|
||||
func2 (int x)
|
||||
{
|
||||
int coremaker_local[5];
|
||||
int i;
|
||||
static int y;
|
||||
|
||||
/* Make sure that coremaker_local doesn't get optimized away. */
|
||||
for (i = 0; i < 5; i++)
|
||||
coremaker_local[i] = i;
|
||||
coremaker_bss = 0;
|
||||
for (i = 0; i < 5; i++)
|
||||
coremaker_bss += coremaker_local[i];
|
||||
coremaker_data = coremaker_ro + 1;
|
||||
y = 10 * x;
|
||||
ABORT;
|
||||
}
|
||||
|
||||
void
|
||||
func1 (int x)
|
||||
{
|
||||
func2 (x * 2);
|
||||
}
|
||||
|
||||
int main ()
|
||||
{
|
||||
func1 (10);
|
||||
return 0;
|
||||
}
|
@ -175,6 +175,12 @@ gdb_expect {
|
||||
if {![target_info exists use_cygmon] || ![target_info use_cygmon]} {
|
||||
send_gdb "n\n"
|
||||
gdb_expect {
|
||||
-re "Program exited normally.*$gdb_prompt $" {
|
||||
# If we actually have debug info for the start function,
|
||||
# then we won't get the "Single-stepping until function
|
||||
# exit" message.
|
||||
pass "step to end of run 1"
|
||||
}
|
||||
-re ".*Single.*Program exited.*$gdb_prompt $" {
|
||||
pass "step to end of run 1"
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -125,19 +125,44 @@ proc gdb_load_timed {executable downloadsize class writesize} {
|
||||
pass $test
|
||||
}
|
||||
|
||||
|
||||
|
||||
gdb_load_timed $binfile {} "" {}
|
||||
|
||||
# Typically about 400 bytes can be downloaded
|
||||
gdb_load_timed $binfile 0 "limit" 399
|
||||
gdb_load_timed $binfile 0 "limit" 401
|
||||
|
||||
# fall back to the default
|
||||
gdb_load_timed $binfile 0 "limit" 0
|
||||
# Typically about 400-1 bytes can be downloaded
|
||||
gdb_load_timed $binfile 0 "limit" 398
|
||||
gdb_load_timed $binfile 0 "limit" 400
|
||||
|
||||
# Absolute max is 16384
|
||||
gdb_load_timed $binfile 0 "fixed" 0
|
||||
gdb_load_timed $binfile 0 "fixed" 16385
|
||||
|
||||
# fall back to the default
|
||||
gdb_load_timed $binfile 0 "limit" 0
|
||||
|
||||
|
||||
#
|
||||
# Part THREE: Check the upload behavour
|
||||
#
|
||||
|
||||
# Carefully check memory around each of the most common packet edge
|
||||
# conditions
|
||||
|
||||
gdb_test "x/8ub random_data" \
|
||||
"<random_data>:\[ \t\]+60\[ \t\]+74\[ \t\]+216\[ \t\]+38\[ \t\]+149\[ \t\]+49\[ \t\]+207\[ \t\]+44"
|
||||
|
||||
gdb_test "x/8ub random_data + 400 - 4" \
|
||||
"<random_data\\+396>:\[ \t\]+185\[ \t\]+255\[ \t\]+50\[ \t\]+140\[ \t\]+237\[ \t\]+172\[ \t\]+143\[ \t\]+93"
|
||||
|
||||
gdb_test "x/8ub random_data + 16384 - 4" \
|
||||
"<random_data\\+16380>:\[ \t\]+178\[ \t\]+180\[ \t\]+135\[ \t\]+93\[ \t\]+70\[ \t\]+62\[ \t\]+205\[ \t\]+76"
|
||||
|
||||
|
||||
# Read a chunk just larger than the packet size (reduce the packet
|
||||
# size to make life easier)
|
||||
gdb_test "set remote memory-read-packet-size 16" \
|
||||
""
|
||||
gdb_test "show remote memory-read-packet-size" \
|
||||
"The memory-read-packet-size is 16. Packets are limited to 16 bytes."
|
||||
gdb_test "x/17ub random_data" \
|
||||
"<random_data>:\[ \t\]+60\[ \t\]+74\[ \t\]+216\[ \t\]+38\[ \t\]+149\[ \t\]+49\[ \t\]+207\[ \t\]+44.*<random_data\\+8>:\[ \t\]+124\[ \t\]+38\[ \t\]+93\[ \t\]+125\[ \t\]+232\[ \t\]+67\[ \t\]+228\[ \t\]+56.*<random_data\\+16>:\[ \t\]+161"
|
||||
|
||||
gdb_exit
|
||||
|
@ -194,7 +194,10 @@ test_i "nexti over function" "nexti" \
|
||||
# right behavior for GDB or not, but we'll catch it here, so folks
|
||||
# won't forget about it.
|
||||
|
||||
send_gdb "break [gdb_get_line_number "step-test.exp: large struct by value"]\n"
|
||||
gdb_test \
|
||||
"break [gdb_get_line_number "step-test.exp: large struct by value"]" \
|
||||
".*Breakpoint.* at .*" \
|
||||
"set breakpoint at call to large_struct_by_value"
|
||||
gdb_test "continue" \
|
||||
".*Breakpoint ${decimal},.*large_struct_by_value.*" \
|
||||
"run to pass large struct"
|
||||
|
@ -233,22 +233,37 @@ Continuing.*\[Ww\]atchpoint.*ival3.*Old value = -1.*New value = 0.*ival3 = count
|
||||
eof { fail "watchpoint hit, first time (eof)" ; return }
|
||||
}
|
||||
|
||||
# Check that the hit count is reported correctly
|
||||
gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival3\r\n\[ \t]+breakpoint already hit 1 time.*" "Watchpoint hit count is 1"
|
||||
|
||||
gdb_test "delete \$func1_breakpoint_number" ""
|
||||
|
||||
# Continue until the next change, from 0 to 1.
|
||||
gdb_test "cont" "Continuing.*\[Ww\]atchpoint.*ival3.*Old value = 0.*New value = 1.*ival3 = count; ival4 = count;.*" "watchpoint hit, second time"
|
||||
|
||||
# Check that the hit count is reported correctly
|
||||
gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival3\r\n\[ \t]+breakpoint already hit 2 times.*" "Watchpoint hit count is 2"
|
||||
|
||||
# Continue until the next change, from 1 to 2.
|
||||
gdb_test "cont" "Continuing.*\[Ww\]atchpoint.*ival3.*Old value = 1.*New value = 2.*ival3 = count; ival4 = count;.*" "watchpoint hit, third time"
|
||||
|
||||
# Check that the hit count is reported correctly
|
||||
gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival3\r\n\[ \t]+breakpoint already hit 3 times.*" "Watchpoint hit count is 3"
|
||||
|
||||
# Continue until the next change, from 2 to 3.
|
||||
gdb_test "cont" "Continuing.*\[Ww\]atchpoint.*ival3.*Old value = 2.*New value = 3.*ival3 = count; ival4 = count;.*" "watchpoint hit, fourth time"
|
||||
|
||||
# Check that the hit count is reported correctly
|
||||
gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival3\r\n\[ \t]+breakpoint already hit 4 times.*" "Watchpoint hit count is 4"
|
||||
|
||||
# Continue until the next change, from 3 to 4.
|
||||
# Note that this one is outside the loop.
|
||||
|
||||
gdb_test "cont" "Continuing.*\[Ww\]atchpoint.*ival3.*Old value = 3.*New value = 4.*ival3 = count; ival4 = count;.*" "watchpoint hit, fifth time"
|
||||
|
||||
# Check that the hit count is reported correctly
|
||||
gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival3\r\n\[ \t]+breakpoint already hit 5 times.*" "Watchpoint hit count is 5"
|
||||
|
||||
# Continue until we hit the finishing marker function.
|
||||
# Make sure we hit no more watchpoints.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 1992, 1994, 1995, 1997 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1992, 1994, 1995, 1997, 1999 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -328,10 +328,13 @@ proc test_ptype_class_objects {} {
|
||||
# for now, but with a FIXME. At some future point, gdb should use a
|
||||
# portable representation for the virtual table constructs.
|
||||
|
||||
# The format of a g++ virtual base pointer.
|
||||
set vbptr "(_vb\[$.\]|__vb_)\[0-9\]?"
|
||||
|
||||
setup_xfail_format "DWARF 1"
|
||||
send_gdb "ptype class vB\n"
|
||||
gdb_expect {
|
||||
-re "type = class vB : public virtual vA \{${ws}private:${ws}vA \\*_vb.vA;${ws}public:${ws}int vb;${ws}int vx;${ws}vB & operator=\\(vB const &\\);${ws}vB\\(int, vB const &\\);${ws}vB\\(int\\);${ws}\}$nl$gdb_prompt $" {
|
||||
-re "type = class vB : public virtual vA \{${ws}private:${ws}vA \\*${vbptr}vA;${ws}public:${ws}int vb;${ws}int vx;${ws}vB & operator=\\(vB const &\\);${ws}vB\\(int, vB const &\\);${ws}vB\\(int\\);${ws}\}$nl$gdb_prompt $" {
|
||||
setup_xfail "*-*-*"
|
||||
fail "ptype class vB (FIXME: non-portable virtual table constructs)"
|
||||
}
|
||||
@ -358,7 +361,7 @@ proc test_ptype_class_objects {} {
|
||||
setup_xfail_format "DWARF 1"
|
||||
send_gdb "ptype class vC\n"
|
||||
gdb_expect {
|
||||
-re "type = class vC : public virtual vA \{${ws}private:${ws}vA \\*_vb.vA;${ws}public:${ws}int vc;${ws}int vx;${ws}vC & operator=\\(vC const &\\);${ws}vC\\(int, vC const &\\);${ws}vC\\(int\\);${ws}\}$nl$gdb_prompt $" {
|
||||
-re "type = class vC : public virtual vA \{${ws}private:${ws}vA \\*${vbptr}vA;${ws}public:${ws}int vc;${ws}int vx;${ws}vC & operator=\\(vC const &\\);${ws}vC\\(int, vC const &\\);${ws}vC\\(int\\);${ws}\}$nl$gdb_prompt $" {
|
||||
setup_xfail "*-*-*"
|
||||
fail "ptype class vC (FIXME: non-portable virtual table constructs)"
|
||||
}
|
||||
@ -385,7 +388,7 @@ proc test_ptype_class_objects {} {
|
||||
setup_xfail_format "DWARF 1"
|
||||
send_gdb "ptype class vD\n"
|
||||
gdb_expect {
|
||||
-re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \\*_vb.vC;${ws}vB \\*_vb.vB;${ws}public:${ws}int vd;${ws}int vx;${ws}vD & operator=\\(vD const &\\);${ws}vD\\(int, vD const &\\);${ws}vD\\(int\\);${ws}\}$nl$gdb_prompt $" {
|
||||
-re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \\*${vbptr}vC;${ws}vB \\*${vbptr}vB;${ws}public:${ws}int vd;${ws}int vx;${ws}vD & operator=\\(vD const &\\);${ws}vD\\(int, vD const &\\);${ws}vD\\(int\\);${ws}\}$nl$gdb_prompt $" {
|
||||
setup_xfail "*-*-*"
|
||||
fail "ptype class vD (FIXME: non-portable virtual table constructs)"
|
||||
}
|
||||
@ -412,7 +415,7 @@ proc test_ptype_class_objects {} {
|
||||
setup_xfail_format "DWARF 1"
|
||||
send_gdb "ptype class vE\n"
|
||||
gdb_expect {
|
||||
-re "type = class vE : public virtual vD \{${ws}private:${ws}vD \\*_vb.vD;${ws}public:${ws}int ve;${ws}int vx;${ws}vE & operator=\\(vE const &\\);${ws}vE\\(int, vE const &\\);${ws}vE\\(int\\);${ws}\}$nl$gdb_prompt $" {
|
||||
-re "type = class vE : public virtual vD \{${ws}private:${ws}vD \\*${vbptr}vD;${ws}public:${ws}int ve;${ws}int vx;${ws}vE & operator=\\(vE const &\\);${ws}vE\\(int, vE const &\\);${ws}vE\\(int\\);${ws}\}$nl$gdb_prompt $" {
|
||||
setup_xfail "*-*-*"
|
||||
fail "ptype class vE (FIXME: non-portable virtual table constructs)"
|
||||
}
|
||||
@ -456,7 +459,7 @@ proc test_ptype_class_objects {} {
|
||||
-re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;\r\n${ws}Foo\\(int, int\\);${ws}int operator!.void.;${ws}operator int.void.;${ws}int times.int.;$nl\}$nl$gdb_prompt $" {
|
||||
pass "ptype class Foo(aCC)"
|
||||
}
|
||||
-re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;${ws}Foo & operator=\\(Foo const &\\);${ws}Foo\\(Foo const &\\);${ws}Foo\\(int, int\\);${ws}int operator!\\(void\\);${ws}int operator int\\(void\\);${ws}int times\\(int\\);${ws}\}$nl$gdb_prompt $" {
|
||||
-re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;${ws}Foo & operator=\\(Foo const &\\);${ws}Foo\\(Foo const &\\);${ws}Foo\\(int, int\\);${ws}int operator!\\(void\\);${ws}operator int\\(void\\);${ws}int times\\(int\\);${ws}\}$nl$gdb_prompt $" {
|
||||
pass "ptype class Foo"
|
||||
}
|
||||
-re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;((${ws}Foo & operator=\\(Foo const &\\);)|(${ws}Foo\\(Foo const &\\);)|(${ws}Foo\\(int, int\\);)|(${ws}int operator!\\(void\\);)|(${ws}int operator int\\(void\\);)|(${ws}int times\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
|
||||
@ -828,11 +831,12 @@ gdb_expect {
|
||||
}
|
||||
|
||||
# ptype on the enum member
|
||||
# The second success case is a little dubious, but it's not clear what
|
||||
# The third success case is a little dubious, but it's not clear what
|
||||
# ought to be required of a ptype on a private enum... -sts 19990324
|
||||
send_gdb "ptype obj_with_enum.priv_enum\n"
|
||||
gdb_expect {
|
||||
-re "type = enum ClassWithEnum::PrivEnum \\{red, green, blue, yellow = 42\\}.*$gdb_prompt $" { pass "ptype obj_with_enum.priv_enum" }
|
||||
-re "type = enum PrivEnum \\{red, green, blue, yellow = 42\\}.*$gdb_prompt $" { pass "ptype obj_with_enum.priv_enum" }
|
||||
-re "type = enum \\{red, green, blue, yellow = 42\\}.*$gdb_prompt $" { pass "ptype obj_with_enum.priv_enum" }
|
||||
-re "$gdb_prompt $" { fail "ptype obj_with_enum.priv_enum" }
|
||||
timeout { fail "(timeout) ptype obj_with_enum.priv_enum" }
|
||||
|
@ -120,7 +120,7 @@ gdb_expect {
|
||||
if {$gcc_compiled} then {
|
||||
send_gdb "ptype d_instance\n"
|
||||
gdb_expect {
|
||||
-re "type = class D : private A, public B, private C \{\r\n\[\t \]*public:\r\n\[\t \]*int d;\r\n\[\t \]*int dd;\[\r\n\t ]+D & operator=\\(D const &\\);\[\r\n\t ]+D\\(D const &\\);\[\r\n\t \]+D\\(void\\);\r\n\[\t \]*int dfoo\\(void\\);\r\n\[\t \]*int foo\\(void\\);\r\n\}.*$gdb_prompt $" { pass "ptype d_instance" }
|
||||
-re "type = class D : private A, public B, (protected|private) C \{\r\n\[\t \]*public:\r\n\[\t \]*int d;\r\n\[\t \]*int dd;\[\r\n\t ]+D & operator=\\(D const &\\);\[\r\n\t ]+D\\(D const &\\);\[\r\n\t \]+D\\(void\\);\r\n\[\t \]*int dfoo\\(void\\);\r\n\[\t \]*int foo\\(void\\);\r\n\}.*$gdb_prompt $" { pass "ptype d_instance" }
|
||||
-re "type = class D : private A, public B, private C \{\r\n\[\t \]*public:\r\n\[\t \]*int d;\r\n\[\t \]*int dd;\[\r\n\t \]+D\\(void\\);\r\n\[\t \]*int dfoo\\(void\\);\r\n\[\t \]*int foo\\(void\\);\r\n\}.*$gdb_prompt $" { pass "ptype d_instance" }
|
||||
-re ".*$gdb_prompt $" { fail "ptype d_instance" }
|
||||
timeout { fail "(timeout) ptype d_instance" }
|
||||
@ -150,7 +150,7 @@ gdb_expect {
|
||||
if {$gcc_compiled} {
|
||||
send_gdb "ptype e_instance\n"
|
||||
gdb_expect {
|
||||
-re "type = class E : public A, private B, private C \{\r\n\[\t \]*public:\r\n\[\t \]*int e;\r\n\[\t \]*int ee;\[\r\n\t ]+E & operator=\\(E const &\\);\[\r\n\t ]+E\\(E const &\\);\[\r\n\t \]+E\\(void\\);\r\n\[\t \]*int efoo\\(void\\);\r\n\[\t \]*int foo\\(void\\);\r\n\}.*$gdb_prompt $" { pass "ptype e_instance" }
|
||||
-re "type = class E : public A, private B, (protected|private) C \{\r\n\[\t \]*public:\r\n\[\t \]*int e;\r\n\[\t \]*int ee;\[\r\n\t ]+E & operator=\\(E const &\\);\[\r\n\t ]+E\\(E const &\\);\[\r\n\t \]+E\\(void\\);\r\n\[\t \]*int efoo\\(void\\);\r\n\[\t \]*int foo\\(void\\);\r\n\}.*$gdb_prompt $" { pass "ptype e_instance" }
|
||||
-re "type = class E : public A, private B, private C \{\r\n\[\t \]*public:\r\n\[\t \]*int e;\r\n\[\t \]*int ee;\[\r\n\t \]+E\\(void\\);\r\n\[\t \]*int efoo\\(void\\);\r\n\[\t \]*int foo\\(void\\);\r\n\}.*$gdb_prompt $" { pass "ptype e_instance" }
|
||||
-re ".*$gdb_prompt $" { fail "ptype e_instance" }
|
||||
timeout { fail "(timeout) ptype e_instance" }
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1992, 1993, 1994, 1997, 1999 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -22,6 +22,9 @@
|
||||
set ws "\[\r\n\t \]+"
|
||||
set nl "\[\r\n\]+"
|
||||
|
||||
# The format of a g++ virtual base pointer.
|
||||
set vbptr "(_vb\[$.\]|__vb_)\[0-9\]?"
|
||||
|
||||
if $tracelevel then {
|
||||
strace $tracelevel
|
||||
}
|
||||
@ -575,6 +578,7 @@ proc test_ptype_vi {} {
|
||||
global gdb_prompt
|
||||
global ws
|
||||
global nl
|
||||
global vbptr
|
||||
|
||||
# This class does not use any C++-specific features, so it's fine for
|
||||
# it to print as "struct".
|
||||
@ -621,7 +625,7 @@ proc test_ptype_vi {} {
|
||||
setup_xfail_format "DWARF 1"
|
||||
send_gdb "ptype vB\n"
|
||||
gdb_expect {
|
||||
-re "ptype vB${nl}type = class vB : public virtual vA \{$nl private:${ws}vA \[*\]+_vb\[\\\$\.\]+vA;$nl public:${ws}int vb;${ws}int vx;$nl.*\}$nl$gdb_prompt $" {
|
||||
-re "ptype vB${nl}type = class vB : public virtual vA \{$nl private:${ws}vA \\*${vbptr}vA;$nl public:${ws}int vb;${ws}int vx;$nl.*\}$nl$gdb_prompt $" {
|
||||
pass "ptype vB"
|
||||
}
|
||||
-re "ptype vB${nl}type = class vB : public virtual vA \{$nl public:${ws}int vb;${ws}int vx;$nl.*\}$nl$gdb_prompt $" {
|
||||
@ -634,7 +638,7 @@ proc test_ptype_vi {} {
|
||||
setup_xfail_format "DWARF 1"
|
||||
send_gdb "ptype class vB\n"
|
||||
gdb_expect {
|
||||
-re "type = class vB : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \[*\]+_vb\[\\\$\.\]vA;$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
|
||||
-re "type = class vB : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \\*${vbptr}vA;$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
|
||||
pass "ptype class vB"
|
||||
}
|
||||
-re "type = class vB : public virtual vA \{$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
|
||||
@ -647,7 +651,7 @@ proc test_ptype_vi {} {
|
||||
setup_xfail_format "DWARF 1"
|
||||
send_gdb "ptype g_vB\n"
|
||||
gdb_expect {
|
||||
-re "type = class vB : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \[*\]+_vb\[\\\$\.\]vA;$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
|
||||
-re "type = class vB : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \\*${vbptr}vA;$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
|
||||
pass "ptype g_vB"
|
||||
}
|
||||
-re "type = class vB : public virtual vA \{$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
|
||||
@ -660,7 +664,7 @@ proc test_ptype_vi {} {
|
||||
setup_xfail_format "DWARF 1"
|
||||
send_gdb "ptype vC\n"
|
||||
gdb_expect {
|
||||
-re "type = class vC : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \[*\]+_vb\[\\\$\.\]vA;$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
|
||||
-re "type = class vC : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \\*${vbptr}vA;$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
|
||||
pass "ptype vC"
|
||||
}
|
||||
-re "type = class vC : public virtual vA \{$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
|
||||
@ -673,7 +677,7 @@ proc test_ptype_vi {} {
|
||||
setup_xfail_format "DWARF 1"
|
||||
send_gdb "ptype class vC\n"
|
||||
gdb_expect {
|
||||
-re "type = class vC : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \[*\]+_vb\[\\\$\.\]vA;$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
|
||||
-re "type = class vC : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \\*${vbptr}vA;$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
|
||||
pass "ptype class vC"
|
||||
}
|
||||
-re "type = class vC : public virtual vA \{$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
|
||||
@ -686,7 +690,7 @@ proc test_ptype_vi {} {
|
||||
setup_xfail_format "DWARF 1"
|
||||
send_gdb "ptype g_vC\n"
|
||||
gdb_expect {
|
||||
-re "type = class vC : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \[*\]+_vb\[\\\$\.\]vA;$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
|
||||
-re "type = class vC : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \\*${vbptr}vA;$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
|
||||
pass "ptype g_vC"
|
||||
}
|
||||
-re "type = class vC : public virtual vA \{$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
|
||||
@ -706,6 +710,7 @@ proc test_print_svi_classes {} {
|
||||
global hex
|
||||
global decimal
|
||||
global nl
|
||||
global vbptr
|
||||
|
||||
# Print all members of g_vA.
|
||||
|
||||
@ -722,7 +727,7 @@ proc test_print_svi_classes {} {
|
||||
-re ".* = \{\<class vA\> = \{va = 3, vx = 4\}, vb = 5, vx = 6, __vfp = $hex\}$nl$gdb_prompt $" {
|
||||
pass "print g_vB (aCC)"
|
||||
}
|
||||
-re ".* = \{\<vA\> = \{va = 3, vx = 4\}, _vb\[\\\$\.\]vA = $hex, vb = 5, vx = 6\}$nl$gdb_prompt $" {
|
||||
-re ".* = \{\<vA\> = \{va = 3, vx = 4\}, ${vbptr}vA = $hex, vb = 5, vx = 6\}$nl$gdb_prompt $" {
|
||||
pass "print g_vB"
|
||||
}
|
||||
-re ".*invalid address 0x0.*$gdb_prompt $" {
|
||||
@ -746,7 +751,7 @@ proc test_print_svi_classes {} {
|
||||
-re ".* = \{\<class vA\> = \{va = 7, vx = 8\}, vc = 9, vx = 10, __vfp = $hex\}$nl$gdb_prompt $" {
|
||||
pass "print g_vC (aCC)"
|
||||
}
|
||||
-re ".* = \{\<vA\> = \{va = 7, vx = 8\}, _vb\[\\\$\.\]vA = $hex, vc = 9, vx = 10\}$nl$gdb_prompt $" {
|
||||
-re ".* = \{\<vA\> = \{va = 7, vx = 8\}, ${vbptr}vA = $hex, vc = 9, vx = 10\}$nl$gdb_prompt $" {
|
||||
pass "print g_vC"
|
||||
}
|
||||
-re ".*$gdb_prompt $" { fail "print g_vC" }
|
||||
@ -836,11 +841,12 @@ proc test_ptype_mvi {} {
|
||||
global gdb_prompt
|
||||
global ws
|
||||
global nl
|
||||
global vbptr
|
||||
|
||||
setup_xfail_format "DWARF 1"
|
||||
send_gdb "ptype vD\n"
|
||||
gdb_expect {
|
||||
-re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \[*\]+_vb\[\\\$\.\]vC;${ws}vB \[*\]+_vb\[\\\$\.\]vB;${ws}public:${ws}int vd;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
|
||||
-re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \\*${vbptr}vC;${ws}vB \\*${vbptr}vB;${ws}public:${ws}int vd;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
|
||||
pass "ptype vD"
|
||||
}
|
||||
-re ".*class vD : public virtual vB, public virtual vC \{${ws}public:${ws}int vd;${ws}int vx;.*\}.*$gdb_prompt $" {
|
||||
@ -853,7 +859,7 @@ proc test_ptype_mvi {} {
|
||||
setup_xfail_format "DWARF 1"
|
||||
send_gdb "ptype class vD\n"
|
||||
gdb_expect {
|
||||
-re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \[*\]+_vb\[\\\$\.\]vC;${ws}vB \[*\]+_vb\[\\\$\.\]vB;${ws}public:${ws}int vd;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
|
||||
-re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \\*${vbptr}vC;${ws}vB \\*${vbptr}vB;${ws}public:${ws}int vd;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
|
||||
pass "ptype class vD"
|
||||
}
|
||||
-re ".*class vD : public virtual vB, public virtual vC \{${ws}public:${ws}int vd;${ws}int vx;.*\}.*$gdb_prompt $" {
|
||||
@ -866,7 +872,7 @@ proc test_ptype_mvi {} {
|
||||
setup_xfail_format "DWARF 1"
|
||||
send_gdb "ptype g_vD\n"
|
||||
gdb_expect {
|
||||
-re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \[*\]+_vb\[\\\$\.\]vC;${ws}vB \[*\]+_vb\[\\\$\.\]vB;${ws}public:${ws}int vd;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
|
||||
-re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \\*${vbptr}vC;${ws}vB \\*${vbptr}vB;${ws}public:${ws}int vd;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
|
||||
pass "ptype g_vD"
|
||||
}
|
||||
-re ".*class vD : public virtual vB, public virtual vC \{${ws}public:${ws}int vd;${ws}int vx;\r\n.*\}.*$gdb_prompt $" {
|
||||
@ -879,7 +885,7 @@ proc test_ptype_mvi {} {
|
||||
setup_xfail_format "DWARF 1"
|
||||
send_gdb "ptype vE\n"
|
||||
gdb_expect {
|
||||
-re "type = class vE : public virtual vD \{${ws}private:${ws}vD \[*\]+_vb\[\\\$\.\]vD;${ws}public:${ws}int ve;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
|
||||
-re "type = class vE : public virtual vD \{${ws}private:${ws}vD \\*${vbptr}vD;${ws}public:${ws}int ve;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
|
||||
pass "ptype vE"
|
||||
}
|
||||
-re ".*class vE : public virtual vD \{${ws}public:${ws}int ve;${ws}int vx;\r\n.*\}.*$gdb_prompt $" {
|
||||
@ -892,7 +898,7 @@ proc test_ptype_mvi {} {
|
||||
setup_xfail_format "DWARF 1"
|
||||
send_gdb "ptype class vE\n"
|
||||
gdb_expect {
|
||||
-re "type = class vE : public virtual vD \{${ws}private:${ws}vD \[*\]+_vb\[\\\$\.\]vD;${ws}public:${ws}int ve;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
|
||||
-re "type = class vE : public virtual vD \{${ws}private:${ws}vD \\*${vbptr}vD;${ws}public:${ws}int ve;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
|
||||
pass "ptype class vE"
|
||||
}
|
||||
-re "type = class vE : public virtual vD \{${ws}public:${ws}int ve;${ws}int vx;\r\n.*\}.*$gdb_prompt $" {
|
||||
@ -905,7 +911,7 @@ proc test_ptype_mvi {} {
|
||||
setup_xfail_format "DWARF 1"
|
||||
send_gdb "ptype g_vE\n"
|
||||
gdb_expect {
|
||||
-re "type = class vE : public virtual vD \{${ws}private:${ws}vD \[*\]+_vb\[\\\$\.\]vD;${ws}public:${ws}int ve;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
|
||||
-re "type = class vE : public virtual vD \{${ws}private:${ws}vD \\*${vbptr}vD;${ws}public:${ws}int ve;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
|
||||
pass "ptype g_vE"
|
||||
}
|
||||
-re "type = class vE : public virtual vD \{${ws}public:${ws}int ve;${ws}int vx;\r\n.*\}.*$gdb_prompt $" {
|
||||
@ -925,6 +931,7 @@ proc test_print_mvi_classes {} {
|
||||
global hex
|
||||
global decimal
|
||||
global nl
|
||||
global vbptr
|
||||
|
||||
# Print all members of g_vD.
|
||||
|
||||
@ -937,7 +944,7 @@ proc test_print_mvi_classes {} {
|
||||
-re ".* = \{\<class vB\> = \{\<class vA\> = \{va = 19, vx = 20\}, vb = 21, vx = 22, __vfp = $hex\}, \<class vC\> = \{vc = 23, vx = 24, __vfp = $hex\}, vd = 25, vx = 26, __vfp = $hex\}$nl$gdb_prompt $" {
|
||||
pass "print g_vD (aCC)"
|
||||
}
|
||||
-re ".* = \{\<vB\> = \{\<vA\> = \{va = 19, vx = 20\}, _vb\[\\\$\.\]vA = $hex, vb = 21, vx = 22\}, \<vC\> = \{_vb\[\\\$\.\]vA = $hex, vc = 23, vx = 24\}, _vb\[\\\$\.\]vC = $hex, _vb\[\\\$\.\]vB = $hex, vd = 25, vx = 26\}$nl$gdb_prompt $" {
|
||||
-re ".* = \{\<vB\> = \{\<vA\> = \{va = 19, vx = 20\}, ${vbptr}vA = $hex, vb = 21, vx = 22\}, \<vC\> = \{${vbptr}vA = $hex, vc = 23, vx = 24\}, ${vbptr}vC = $hex, ${vbptr}vB = $hex, vd = 25, vx = 26\}$nl$gdb_prompt $" {
|
||||
pass "print g_vD"
|
||||
}
|
||||
-re ".*invalid address 0x0.*$gdb_prompt $" {
|
||||
@ -961,7 +968,7 @@ proc test_print_mvi_classes {} {
|
||||
-re ".* = \{\<class vD\> = \{\<class vB\> = \{\<class vA\> = \{va = 0, vx = 0\}, vb = 0, vx = 0, __vfp = $hex\}, \<class vC\> = \{vc = 0, vx = 0, __vfp = $hex\}, vd = 0, vx = 0, __vfp = $hex\}, ve = 27, vx = 28, __vfp = $hex\}$nl$gdb_prompt $" {
|
||||
pass "print g_vE (aCC)"
|
||||
}
|
||||
-re ".* = \{\<vD\> = \{\<vB\> = \{\<vA\> = \{va = 0, vx = 0\}, _vb\[\\\$\.\]vA = $hex, vb = 0, vx = 0\}, \<vC\> = \{_vb\[\\\$\.\]vA = $hex, vc = 0, vx = 0\}, _vb\[\\\$\.\]vC = $hex, _vb\[\\\$\.\]vB = $hex, vd = 0, vx = 0\}, _vb\[\\\$\.\]vD = $hex, ve = 27, vx = 28\}$nl$gdb_prompt $" {
|
||||
-re ".* = \{\<vD\> = \{\<vB\> = \{\<vA\> = \{va = 0, vx = 0\}, ${vbptr}vA = $hex, vb = 0, vx = 0\}, \<vC\> = \{${vbptr}vA = $hex, vc = 0, vx = 0\}, ${vbptr}vC = $hex, ${vbptr}vB = $hex, vd = 0, vx = 0\}, ${vbptr}vD = $hex, ve = 27, vx = 28\}$nl$gdb_prompt $" {
|
||||
pass "print g_vE"
|
||||
}
|
||||
-re ".*$gdb_prompt $" { fail "print g_vE" }
|
||||
|
@ -85,12 +85,15 @@ if {$gcc_compiled} then {
|
||||
setup_xfail "*-*-*"
|
||||
}
|
||||
|
||||
# Local classes in g++ get names like "main.1::InnerLocal", just like local
|
||||
# static variables. Some targets use "___" instead of ".".
|
||||
set sep "(\[.\]|___)\[0-9\]"
|
||||
|
||||
send_gdb "ptype Local\n"
|
||||
gdb_expect {
|
||||
-re "type = class Local \{\r\n\[\t \]*public:\r\n\[\t \]*int loc1;\r\n\r\n\[\t \]*.char loc_foo\\(char\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:10\\).*$gdb_prompt $" { pass "ptype Local" }
|
||||
-re "type = class Local \{\r\n\[\t \]*public:\r\n\[\t \]*int loc1;\r\n\r\n\[\t \]*.char loc_foo\\(char\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:\[0-9\]*\\).*$gdb_prompt $" { pass "ptype Local (incorrect line number?)" }
|
||||
-re "type = class Local \{\r\n\[\t \]*public:\r\n\[\t \]*int loc1;\r\n\r\n\[\t \]*Local & Local::operator=\\(foobar__Fi___0::Local const &\\);\r\n\[\t \]*Local::Local\\(foobar__Fi___0::Local const &\\);\r\n\[\t \]*Local::Local\\(void\\);\r\n\[\t \]*char Local::loc_foo\\(char\\);\r\n\[\t \]*\}*.*$gdb_prompt $" { pass "ptype Local" }
|
||||
-re "type = class Local \{\r\n\[\t \]*public:\r\n\[\t \]*int loc1;\r\n\r\n\[\t \]*Local & Local const &\\);\r\n\[\t \]*Local const &\\);\r\n\[\t \]*Local\\(void\\);\r\n\[\t \]*char loc_foo\\(char\\);\r\n\[\t \]*\}\[\t \]*.*$gdb_prompt $" { pass "ptype Local" }
|
||||
-re "type = class Local \{\r\n\[\t \]*public:\r\n\[\t \]*int loc1;\r\n\r\n\[\t \]*Local & operator=\\((foobar__Fi${sep}::|)Local const &\\);\r\n\[\t \]*Local\\((foobar__Fi${sep}::|)Local const &\\);\r\n\[\t \]*Local\\(void\\);\r\n\[\t \]*char loc_foo\\(char\\);\r\n\[\t \]*\}*.*$gdb_prompt $" { pass "ptype Local" }
|
||||
-re "type = class Local \{\r\n\[\t \]*public:\r\n\[\t \]*int loc1;\r\n\r\n\[\t \]*char loc_foo\\(char\\);\r\n\[\t \]*\\(Local at.*local\\.cc:\[0-9\]*\\)\r\n\}.*$gdb_prompt $" { pass "ptype Local (aCC)" }
|
||||
-re ".*$gdb_prompt $" { fail "ptype Local" }
|
||||
timeout { fail "(timeout) ptype Local" }
|
||||
@ -111,8 +114,7 @@ gdb_expect {
|
||||
-re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*InnerLocal::NestedInnerLocal nest1;\r\n\r\n\[\t \]*.int il_foo\\(const unsigned char &\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:\[0-9\]*\\).*$gdb_prompt $" { pass "ptype InnerLocal (incorrect line number?" }
|
||||
-re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*class InnerLocal::NestedInnerLocal nest1;\r\n\r\n\[\t \]*.int il_foo\\(const unsigned char &\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:\[0-9\]*\\).*$gdb_prompt $" { pass "ptype InnerLocal (incorrect line number?" }
|
||||
-re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*InnerLocal::NestedInnerLocal nest1;\r\n\r\n\[\t \]*.int il_foo\\(unsigned char const &\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:36\\).*$gdb_prompt $" { pass "ptype InnerLocal HP aCC" }
|
||||
-re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*NestedInnerLocal nest1;\r\n\r\n\[\t \]*InnerLocal & InnerLocal::operator=\\(main___0::InnerLocal const &\\);\r\n\[\t \]*InnerLocal::InnerLocal\\(main___0::InnerLocal const &\\);\r\n\[\t \]*InnerLocal::InnerLocal\\(void\\);\r\n\[\t \]*int InnerLocal::il_foo\\(unsigned char const &\\);\r\n\*\}\r\n*.*$gdb_prompt $" { pass "ptype InnerLocal" }
|
||||
-re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*NestedInnerLocal nest1;\r\n\r\n\[\t \]*InnerLocal & InnerLocal const &\\);\r\n\[\t \]*InnerLocal const &\\);\r\n\[\t \]*InnerLocal\\(void\\);\r\n\[\t \]*.int il_foo\\(unsigned char const &\\);\r\n\[\t \]*\}\[\t \]*.*$gdb_prompt $" { pass "ptype InnerLocal" }
|
||||
-re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*NestedInnerLocal nest1;\r\n\r\n\[\t \]*InnerLocal & operator=\\((main${sep}::|)InnerLocal const &\\);\r\n\[\t \]*InnerLocal\\((main${sep}::|)InnerLocal const &\\);\r\n\[\t \]*InnerLocal\\(void\\);\r\n\[\t \]*int il_foo\\(unsigned char const &\\);\r\n\*\}\r\n*.*$gdb_prompt $" { pass "ptype InnerLocal" }
|
||||
-re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*class InnerLocal4::NestedInnerLocal nest1;\r\n\r\n\[\t \]*int il_foo\\(unsigned char const &\\);\r\n\[\t \]*\\(Local at.*local\.cc:\[0-9\]+\\)\r\n\}.*$gdb_prompt $" { pass "ptype InnerLocal (aCC)" }
|
||||
-re ".*$gdb_prompt $" { fail "ptype InnerLocal" }
|
||||
timeout { fail "(timeout) ptype InnerLocal" }
|
||||
@ -122,8 +124,7 @@ send_gdb "ptype NestedInnerLocal\n"
|
||||
gdb_expect {
|
||||
-re "type = class InnerLocal::NestedInnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*int nil;\r\n\r\n\[\t \]*.int nil_foo\\(int\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:44\\).*$gdb_prompt $" { pass "ptype NestedInnerLocal" }
|
||||
-re "type = class InnerLocal::NestedInnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*int nil;\r\n\r\n\[\t \]*.int nil_foo\\(int\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:\[0-9\]*\\).*$gdb_prompt $" { pass "ptype NestedInnerLocal (incorrect line number?)" }
|
||||
-re "type = class NestedInnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*int nil;\r\n\r\n\[\t \]*NestedInnerLocal & InnerLocal::NestedInnerLocal::operator=\\(main___1::InnerLocal::NestedInnerLocal const &\\);\r\n\[\t \]*InnerLocal::NestedInnerLocal::NestedInnerLocal\\(main___1::InnerLocal::NestedInnerLocal const &\\);\r\n\[\t \]*InnerLocal::NestedInnerLocal::NestedInnerLocal\\(void\\);\r\n\[\t \]*int InnerLocal::NestedInnerLocal::nil_foo\\(int\\);\r\n\}\r\n*.*$gdb_prompt $" { pass "ptype NestedInnerLocal" }
|
||||
-re "type = class NestedInnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*int nil;\r\n\r\n\[\t \]*NestedInnerLocal & NestedInnerLocal const &\\);\r\n\[\t \]*NestedInnerLocal const &\\);\r\n\[\t \]*NestedInnerLocal\\(void\\);\r\n\[\t \]*int nil_foo\\(int\\);\r\n\[\t \]*\}\r\n*.*$gdb_prompt $" { pass "ptype NestedInnerLocal" }
|
||||
-re "type = class NestedInnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*int nil;\r\n\r\n\[\t \]*NestedInnerLocal & operator=\\((main${sep}::InnerLocal::|)NestedInnerLocal const &\\);\r\n\[\t \]*NestedInnerLocal\\((main${sep}::InnerLocal::|)NestedInnerLocal const &\\);\r\n\[\t \]*NestedInnerLocal\\(void\\);\r\n\[\t \]*int nil_foo\\(int\\);\r\n\}\r\n*.*$gdb_prompt $" { pass "ptype NestedInnerLocal" }
|
||||
-re "No symbol.*in current context.*$gdb_prompt $" { pass "ptype NestedInnerLocal (known aCC limitation)" }
|
||||
-re ".*$gdb_prompt $" { fail "ptype NestedInnerLocal" }
|
||||
timeout { fail "(timeout) ptype NestedInnerLocal" }
|
||||
|
@ -129,18 +129,21 @@ proc test_ptype_of_classes {} {
|
||||
}
|
||||
}
|
||||
|
||||
# The format of a g++ virtual base pointer.
|
||||
set vbptr "(_vb\[$.\]|__vb_)\[0-9\]?"
|
||||
|
||||
send_gdb "ptype A\n"
|
||||
gdb_expect {
|
||||
-re "type = class A : public virtual V \{${ws}private:${ws}V \[*\]+_vb\[\\\$\.\]+V;${ws}int a;${ws}public:${ws}A & operator=\\(A const &\\);${ws}A\\(int, A const &\\);${ws}A\\(int\\);${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
|
||||
-re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:${ws}A & operator=\\(A const &\\);${ws}A\\(int, A const &\\);${ws}A\\(int\\);${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
|
||||
pass "ptype A"
|
||||
}
|
||||
-re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
|
||||
pass "ptype A (aCC)"
|
||||
}
|
||||
-re "type = class A : public virtual V \{${ws}private:${ws}V \[*\]+_vb\[\\\$\.\]+V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const &\\);)|(${ws}A\\(int, A const &\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
|
||||
-re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const &\\);)|(${ws}A\\(int, A const &\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
|
||||
pass "ptype A (obsolescent gcc or gdb)"
|
||||
}
|
||||
-re "type = class A : public virtual V \{${ws}private:${ws}V \[*\]+_vb.FOO;${ws}int a;${ws}public:${ws}virtual int f.void.;${ws}\}$nl$gdb_prompt $" {
|
||||
-re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}FOO;${ws}int a;${ws}public:${ws}virtual int f.void.;${ws}\}$nl$gdb_prompt $" {
|
||||
# This happens because the type is defined only after it is
|
||||
# too late.
|
||||
fail "ptype A (known failure with gcc cygnus-2.4.5-930417)"
|
||||
@ -176,13 +179,13 @@ proc test_ptype_of_classes {} {
|
||||
|
||||
send_gdb "ptype C\n"
|
||||
gdb_expect {
|
||||
-re "type = class C : public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int c;${ws}C & operator=\\(C const &\\);${ws}C\\(int, C const &\\);${ws}C\\(int\\);${ws}\}$nl$gdb_prompt $" {
|
||||
-re "type = class C : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int c;${ws}C & operator=\\(C const &\\);${ws}C\\(int, C const &\\);${ws}C\\(int\\);${ws}\}$nl$gdb_prompt $" {
|
||||
pass "ptype C"
|
||||
}
|
||||
-re "type = class C : public virtual V \{${ws}public:${ws}int c;${ws}\}$nl$gdb_prompt $" {
|
||||
pass "ptype C (aCC)"
|
||||
}
|
||||
-re "type = class C : public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int c;((${ws}C & operator=\\(C const &\\);)|(${ws}C\\(int, C const &\\);)|(${ws}C\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
|
||||
-re "type = class C : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int c;((${ws}C & operator=\\(C const &\\);)|(${ws}C\\(int, C const &\\);)|(${ws}C\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
|
||||
pass "ptype C (obsolescent gcc or gdb)"
|
||||
}
|
||||
-re ".*$gdb_prompt $" {
|
||||
@ -214,13 +217,13 @@ proc test_ptype_of_classes {} {
|
||||
|
||||
send_gdb "ptype D\n"
|
||||
gdb_expect {
|
||||
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
|
||||
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
|
||||
pass "ptype D"
|
||||
}
|
||||
-re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
|
||||
pass "ptype D (aCC)"
|
||||
}
|
||||
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
|
||||
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
|
||||
pass "ptype D (obsolescent gcc or gdb)"
|
||||
}
|
||||
-re ".*$gdb_prompt $" {
|
||||
@ -252,13 +255,13 @@ proc test_ptype_of_classes {} {
|
||||
|
||||
send_gdb "ptype dd\n"
|
||||
gdb_expect {
|
||||
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
|
||||
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
|
||||
pass "ptype dd"
|
||||
}
|
||||
-re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
|
||||
pass "ptype dd (aCC)"
|
||||
}
|
||||
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
|
||||
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
|
||||
pass "ptype dd (obsolescent gcc or gdb)"
|
||||
}
|
||||
-re ".*$gdb_prompt $" {
|
||||
@ -271,13 +274,13 @@ proc test_ptype_of_classes {} {
|
||||
|
||||
send_gdb "ptype ppd\n"
|
||||
gdb_expect {
|
||||
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
|
||||
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
|
||||
pass "ptype ppd"
|
||||
}
|
||||
-re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
|
||||
pass "ptype ppd (aCC)"
|
||||
}
|
||||
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
|
||||
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
|
||||
pass "ptype ppd (obsolescent gcc or gdb)"
|
||||
}
|
||||
-re ".*$gdb_prompt $" {
|
||||
@ -309,13 +312,13 @@ proc test_ptype_of_classes {} {
|
||||
|
||||
send_gdb "ptype a\n"
|
||||
gdb_expect {
|
||||
-re "type = class A : public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}int a;${ws}public:${ws}A & operator=\\(A const &\\);${ws}A\\(int, A const &\\);${ws}A\\(int\\);${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
|
||||
-re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:${ws}A & operator=\\(A const &\\);${ws}A\\(int, A const &\\);${ws}A\\(int\\);${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
|
||||
pass "ptype a"
|
||||
}
|
||||
-re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
|
||||
pass "ptype a (aCC)"
|
||||
}
|
||||
-re "type = class A : public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const &\\);)|(${ws}A\\(int, A const &\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
|
||||
-re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const &\\);)|(${ws}A\\(int, A const &\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
|
||||
pass "ptype a (obsolescent gcc or gdb)"
|
||||
}
|
||||
-re ".*$gdb_prompt $" {
|
||||
@ -347,13 +350,13 @@ proc test_ptype_of_classes {} {
|
||||
|
||||
send_gdb "ptype c\n"
|
||||
gdb_expect {
|
||||
-re "type = class C : public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int c;${ws}C & operator=\\(C const &\\);${ws}C\\(int, C const &\\);${ws}C\\(int\\);${ws}\}$nl$gdb_prompt $" {
|
||||
-re "type = class C : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int c;${ws}C & operator=\\(C const &\\);${ws}C\\(int, C const &\\);${ws}C\\(int\\);${ws}\}$nl$gdb_prompt $" {
|
||||
pass "ptype c"
|
||||
}
|
||||
-re "type = class C : public virtual V \{${ws}public:${ws}int c;${ws}\}$nl$gdb_prompt $" {
|
||||
pass "ptype c (aCC)"
|
||||
}
|
||||
-re "type = class C : public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int c;((${ws}C & operator=\\(C const &\\);)|(${ws}C\\(int, C const &\\);)|(${ws}C\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
|
||||
-re "type = class C : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int c;((${ws}C & operator=\\(C const &\\);)|(${ws}C\\(int, C const &\\);)|(${ws}C\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
|
||||
pass "ptype c (obsolescent gcc or gdb)"
|
||||
}
|
||||
-re ".*$gdb_prompt $" {
|
||||
@ -366,13 +369,13 @@ proc test_ptype_of_classes {} {
|
||||
|
||||
send_gdb "ptype d\n"
|
||||
gdb_expect {
|
||||
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
|
||||
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
|
||||
pass "ptype d"
|
||||
}
|
||||
-re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
|
||||
pass "ptype d (aCC)"
|
||||
}
|
||||
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
|
||||
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
|
||||
pass "ptype d (obsolescent gcc or gdb)"
|
||||
}
|
||||
-re ".*$gdb_prompt $" {
|
||||
@ -442,13 +445,13 @@ proc test_ptype_of_classes {} {
|
||||
|
||||
send_gdb "ptype pAa\n"
|
||||
gdb_expect {
|
||||
-re "type = class A : public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}int a;${ws}public:${ws}A & operator=\\(A const &\\);${ws}A\\(int, A const &\\);${ws}A\\(int\\);${ws}virtual int f\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
|
||||
-re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:${ws}A & operator=\\(A const &\\);${ws}A\\(int, A const &\\);${ws}A\\(int\\);${ws}virtual int f\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
|
||||
pass "ptype pAa"
|
||||
}
|
||||
-re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
|
||||
pass "ptype pAa (aCC)"
|
||||
}
|
||||
-re "type = class A : public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const &\\);)|(${ws}A\\(int, A const &\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
|
||||
-re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const &\\);)|(${ws}A\\(int, A const &\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
|
||||
pass "ptype pAa (obsolescent gcc or gdb)"
|
||||
}
|
||||
-re ".*$gdb_prompt $" {
|
||||
@ -461,13 +464,13 @@ proc test_ptype_of_classes {} {
|
||||
|
||||
send_gdb "ptype pAe\n"
|
||||
gdb_expect {
|
||||
-re "type = class A : public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}int a;${ws}public:${ws}A & operator=\\(A const &\\);${ws}A\\(int, A const &\\);${ws}A\\(int\\);${ws}virtual int f\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
|
||||
-re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:${ws}A & operator=\\(A const &\\);${ws}A\\(int, A const &\\);${ws}A\\(int\\);${ws}virtual int f\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
|
||||
pass "ptype pAe"
|
||||
}
|
||||
-re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
|
||||
pass "ptype pAe (aCC)"
|
||||
}
|
||||
-re "type = class A : public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const &\\);)|(${ws}A\\(int, A const &\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
|
||||
-re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const &\\);)|(${ws}A\\(int, A const &\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
|
||||
pass "ptype pAe (obsolescent gcc or gdb)"
|
||||
}
|
||||
-re ".*$gdb_prompt $" {
|
||||
@ -499,13 +502,13 @@ proc test_ptype_of_classes {} {
|
||||
|
||||
send_gdb "ptype pDd\n"
|
||||
gdb_expect {
|
||||
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
|
||||
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
|
||||
pass "ptype pDd"
|
||||
}
|
||||
-re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
|
||||
pass "ptype pDd (aCC)"
|
||||
}
|
||||
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
|
||||
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
|
||||
pass "ptype pDd (obsolescent gcc or gdb)"
|
||||
}
|
||||
-re ".*$gdb_prompt $" {
|
||||
@ -518,13 +521,13 @@ proc test_ptype_of_classes {} {
|
||||
|
||||
send_gdb "ptype pDe\n"
|
||||
gdb_expect {
|
||||
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
|
||||
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
|
||||
pass "ptype pDe"
|
||||
}
|
||||
-re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
|
||||
pass "ptype pDe (aCC)"
|
||||
}
|
||||
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
|
||||
-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
|
||||
pass "ptype pDe (obsolescent gcc or gdb)"
|
||||
}
|
||||
-re ".*$gdb_prompt $" {
|
||||
|
838
gdb/testsuite/gdb.disasm/am33.exp
Normal file
838
gdb/testsuite/gdb.disasm/am33.exp
Normal file
@ -0,0 +1,838 @@
|
||||
|
||||
# Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
|
||||
# This program 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 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program 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 this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# Please email any bugs, comments, and/or additions to this file to:
|
||||
# bug-gdb@prep.ai.mit.edu
|
||||
|
||||
# This file was written by Jeff Law. (law@cygnus.com)
|
||||
|
||||
if $tracelevel then {
|
||||
strace $tracelevel
|
||||
}
|
||||
|
||||
if ![istarget "mn10300*-*-*"] {
|
||||
verbose "Tests ignored for all but mn10300 based targets."
|
||||
return
|
||||
}
|
||||
|
||||
global exec_output
|
||||
set prms_id 0
|
||||
set bug_id 0
|
||||
|
||||
set testfile "am33"
|
||||
set srcfile ${srcdir}/${subdir}/${testfile}.s
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
if { [gdb_compile "${srcfile}" "${binfile}" object ""] != "" } {
|
||||
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
|
||||
}
|
||||
|
||||
proc call_tests { } {
|
||||
global gdb_prompt
|
||||
global hex
|
||||
global decimal
|
||||
|
||||
send_gdb "x/8i call_tests\n"
|
||||
gdb_expect {
|
||||
-re "
|
||||
.*call .*,.a2,a3,exreg0.,9.*
|
||||
.*call .*,.a2,a3,exreg1.,9.*
|
||||
.*call .*,.a2,a3,exother.,9.*
|
||||
.*call .*,.d2,d3,a2,a3,other,exreg0,exreg1,exother.,9.*
|
||||
.*call .*,.a2,a3,exreg0.,9.*
|
||||
.*call .*,.a2,a3,exreg1.,9.*
|
||||
.*call .*,.a2,a3,exother.,9.*
|
||||
.*call .*,.d2,d3,a2,a3,other,exreg0,exreg1,exother.,9.*
|
||||
.*$gdb_prompt $" { pass "call tests" }
|
||||
-re "$gdb_prompt $" { fail "call tests" }
|
||||
timeout { fail "(timeout) call tests" }
|
||||
}
|
||||
}
|
||||
|
||||
proc movm_tests { } {
|
||||
global gdb_prompt
|
||||
global hex
|
||||
global decimal
|
||||
|
||||
send_gdb "x/16i movm_tests\n"
|
||||
gdb_expect {
|
||||
-re "
|
||||
.*movm \\(sp\\),.a2,a3,exreg0.*
|
||||
.*movm \\(sp\\),.a2,a3,exreg1.*
|
||||
.*movm \\(sp\\),.a2,a3,exother.*
|
||||
.*movm \\(sp\\),.d2,d3,a2,a3,other,exreg0,exreg1,exother.*
|
||||
.*movm .a2,a3,exreg0.,\\(sp\\).*
|
||||
.*movm .a2,a3,exreg1.,\\(sp\\).*
|
||||
.*movm .a2,a3,exother.,\\(sp\\).*
|
||||
.*movm .d2,d3,a2,a3,other,exreg0,exreg1,exother.,\\(sp\\).*
|
||||
.*movm \\(usp\\),.a2,a3,exreg0.*
|
||||
.*movm \\(usp\\),.a2,a3,exreg1.*
|
||||
.*movm \\(usp\\),.a2,a3,exother.*
|
||||
.*movm \\(usp\\),.d2,d3,a2,a3,other,exreg0,exreg1,exother.*
|
||||
.*movm .a2,a3,exreg0.,\\(usp\\).*
|
||||
.*movm .a2,a3,exreg1.,\\(usp\\).*
|
||||
.*movm .a2,a3,exother.,\\(usp\\).*
|
||||
.*movm .d2,d3,a2,a3,other,exreg0,exreg1,exother.,\\(usp\\).*
|
||||
.*$gdb_prompt $" { pass "movm tests" }
|
||||
-re "$gdb_prompt $" { fail "movm tests" }
|
||||
timeout { fail "(timeout) movm tests" }
|
||||
}
|
||||
}
|
||||
|
||||
proc misc_tests { } {
|
||||
global gdb_prompt
|
||||
global hex
|
||||
global decimal
|
||||
|
||||
send_gdb "x/11i misc_tests\n"
|
||||
gdb_expect {
|
||||
-re "
|
||||
.*syscall 4.*
|
||||
.*mcst9 d0.*
|
||||
.*mcst48 d1.*
|
||||
.*getchx d0.*
|
||||
.*getclx d1.*
|
||||
.*clr a1.*
|
||||
.*sat16 a1,a0.*
|
||||
.*mcste r7,r6.*
|
||||
.*swap r5,r4.*
|
||||
.*swaph r3,r2.*
|
||||
.*swhw r1,r0.*
|
||||
.*$gdb_prompt $" { pass "misc tests" }
|
||||
-re "$gdb_prompt $" { fail "misc tests" }
|
||||
timeout { fail "(timeout) misc tests" }
|
||||
}
|
||||
}
|
||||
|
||||
proc mov_tests { } {
|
||||
global gdb_prompt
|
||||
global hex
|
||||
global decimal
|
||||
|
||||
send_gdb "x/45i mov_tests\n"
|
||||
gdb_expect {
|
||||
-re "
|
||||
.*mov r0,r1.*
|
||||
.*mov sp,r1.*
|
||||
.*mov r1,xr2.*
|
||||
.*mov \\(r1\\),r2.*
|
||||
.*mov r3,\\(r4\\).*
|
||||
.*mov \\(sp\\),r5.*
|
||||
.*mov r6,\\(sp\\).*
|
||||
.*mov 16,r1.*
|
||||
.*mov 16,xr1.*
|
||||
.*mov \\(16,r1\\),r2.*
|
||||
.*mov r2,\\(16,r1\\).*
|
||||
.*mov \\(16,sp\\),r2.*
|
||||
.*mov r2,\\(16,sp\\).*
|
||||
.*mov 2096895,r2.*
|
||||
.*mov 2096895,xr2.*
|
||||
.*mov \\(2096895,r1\\),r2.*
|
||||
.*mov r2,\\(2096895,r1\\).*
|
||||
.*mov \\(2096895,sp\\),r2.*
|
||||
.*mov r2,\\(2096895,sp\\).*
|
||||
.*mov \\(0x1ffeff\\),r2.*
|
||||
.*mov r2,\\(0x1ffeff\\).*
|
||||
.*mov 2147417596,r2.*
|
||||
.*mov 2147417596,xr2.*
|
||||
.*mov \\(2147417596,r1\\),r2.*
|
||||
.*mov r2,\\(2147417596,r1\\).*
|
||||
.*mov \\(2147417596,sp\\),r2.*
|
||||
.*mov r2,\\(2147417596,sp\\).*
|
||||
.*mov \\(0x7ffefdfc\\),r2.*
|
||||
.*mov r2,\\(0x7ffefdfc\\).*
|
||||
.*movu 16,r1.*
|
||||
.*movu 2096895,r2.*
|
||||
.*movu 2147417596,r2.*
|
||||
.*mov usp,a0.*
|
||||
.*mov ssp,a1.*
|
||||
.*mov msp,a2.*
|
||||
.*mov pc,a3.*
|
||||
.*mov a0,usp.*
|
||||
.*mov a1,ssp.*
|
||||
.*mov a2,msp.*
|
||||
.*mov epsw,d0.*
|
||||
.*mov d1,epsw.*
|
||||
.*mov a0,r1.*
|
||||
.*mov d2,r3.*
|
||||
.*mov r5,a1.*
|
||||
.*mov r7,d3.*
|
||||
.*$gdb_prompt $" { pass "mov tests" }
|
||||
-re "$gdb_prompt $" { fail "mov tests" }
|
||||
timeout { fail "(timeout) mov tests" }
|
||||
}
|
||||
}
|
||||
|
||||
proc ext_tests { } {
|
||||
global gdb_prompt
|
||||
global hex
|
||||
global decimal
|
||||
|
||||
send_gdb "x/5i ext_tests\n"
|
||||
gdb_expect {
|
||||
-re "
|
||||
.*ext r2.*
|
||||
.*extb r3,r4.*
|
||||
.*extbu r4,r5.*
|
||||
.*exth r6,r7.*
|
||||
.*exthu r7,a0.*
|
||||
.*$gdb_prompt $" { pass "ext tests" }
|
||||
-re "$gdb_prompt $" { fail "ext tests" }
|
||||
timeout { fail "(timeout) ext tests" }
|
||||
}
|
||||
}
|
||||
|
||||
proc add_tests { } {
|
||||
global gdb_prompt
|
||||
global hex
|
||||
global decimal
|
||||
|
||||
send_gdb "x/11i add_tests\n"
|
||||
gdb_expect {
|
||||
-re "
|
||||
.*add a2,a3.*
|
||||
.*add 16,r1.*
|
||||
.*add 2096895,r2.*
|
||||
.*add 2147417596,r2.*
|
||||
.*add r1,r2,r3.*
|
||||
.*addc d0,d1.*
|
||||
.*addc 16,r1.*
|
||||
.*addc 2096895,r2.*
|
||||
.*addc 2147417596,r2.*
|
||||
.*inc d1.*
|
||||
.*inc4 d0.*
|
||||
.*$gdb_prompt $" { pass "add tests" }
|
||||
-re "$gdb_prompt $" { fail "add tests" }
|
||||
timeout { fail "(timeout) add tests" }
|
||||
}
|
||||
}
|
||||
|
||||
proc sub_tests { } {
|
||||
global gdb_prompt
|
||||
global hex
|
||||
global decimal
|
||||
|
||||
send_gdb "x/8i sub_tests\n"
|
||||
gdb_expect {
|
||||
-re "
|
||||
.*sub d2,d3.*
|
||||
.*sub 16,r1.*
|
||||
.*sub 2096895,r2.*
|
||||
.*sub 2147417596,r2.*
|
||||
.*subc d3,d2.*
|
||||
.*subc 16,r1.*
|
||||
.*subc 2096895,r2.*
|
||||
.*subc 2147417596,r2.*
|
||||
.*$gdb_prompt $" { pass "sub tests" }
|
||||
-re "$gdb_prompt $" { fail "sub tests" }
|
||||
timeout { fail "(timeout) sub tests" }
|
||||
}
|
||||
}
|
||||
|
||||
proc cmp_tests { } {
|
||||
global gdb_prompt
|
||||
global hex
|
||||
global decimal
|
||||
|
||||
send_gdb "x/4i cmp_tests\n"
|
||||
gdb_expect {
|
||||
-re "
|
||||
.*cmp a3,a2.*
|
||||
.*cmp 16,r1.*
|
||||
.*cmp 2096895,r2.*
|
||||
.*cmp 2147417596,r2.*
|
||||
.*$gdb_prompt $" { pass "cmp tests" }
|
||||
-re "$gdb_prompt $" { fail "cmp tests" }
|
||||
timeout { fail "(timeout) cmp tests" }
|
||||
}
|
||||
}
|
||||
|
||||
proc logical_tests { } {
|
||||
global gdb_prompt
|
||||
global hex
|
||||
global decimal
|
||||
|
||||
send_gdb "x/15i logical_tests\n"
|
||||
gdb_expect {
|
||||
-re "
|
||||
.*and r0,r1.*
|
||||
.*or r2,r3.*
|
||||
.*xor r4,r5.*
|
||||
.*not r6.*
|
||||
.*and 16,r1.*
|
||||
.*or 16,r1.*
|
||||
.*xor 16,r1.*
|
||||
.*and 2096895,r2.*
|
||||
.*or 2096895,r2.*
|
||||
.*xor 2096895,r2.*
|
||||
.*and 2147417596,r2.*
|
||||
.*or 2147417596,r2.*
|
||||
.*xor 2147417596,r2.*
|
||||
.*and 131072,epsw.*
|
||||
.*or 65535,epsw.*
|
||||
.*$gdb_prompt $" { pass "logical tests" }
|
||||
-re "$gdb_prompt $" { fail "logical tests" }
|
||||
timeout { fail "(timeout) logical tests" }
|
||||
}
|
||||
}
|
||||
|
||||
proc shift_tests { } {
|
||||
global gdb_prompt
|
||||
global hex
|
||||
global decimal
|
||||
|
||||
send_gdb "x/15i shift_tests\n"
|
||||
gdb_expect {
|
||||
-re "
|
||||
.*asr r7,a0.*
|
||||
.*lsr a1,a2.*
|
||||
.*asl a3,d0.*
|
||||
.*asl2 d1.*
|
||||
.*ror d2.*
|
||||
.*rol d3.*
|
||||
.*asr 16,r1.*
|
||||
.*lsr 16,r1.*
|
||||
.*asl 16,r1.*
|
||||
.*asr 2096895,r2.*
|
||||
.*lsr 2096895,r2.*
|
||||
.*asl 2096895,r2.*
|
||||
.*asr 2147417596,r2.*
|
||||
.*lsr 2147417596,r2.*
|
||||
.*asl 2147417596,r2.*
|
||||
.*$gdb_prompt $" { pass "shift tests" }
|
||||
-re "$gdb_prompt $" { fail "shift tests" }
|
||||
timeout { fail "(timeout) shift tests" }
|
||||
}
|
||||
}
|
||||
|
||||
proc muldiv_tests { } {
|
||||
global gdb_prompt
|
||||
global hex
|
||||
global decimal
|
||||
|
||||
send_gdb "x/16i muldiv_tests\n"
|
||||
gdb_expect {
|
||||
-re "
|
||||
.*mul r1,r2.*
|
||||
.*mulu r3,r4.*
|
||||
.*mul 16,r1.*
|
||||
.*mulu 16,r1.*
|
||||
.*mul 2096895,r2.*
|
||||
.*mulu 2096895,r2.*
|
||||
.*mul 2147417596,r2.*
|
||||
.*mulu 2147417596,r2.*
|
||||
.*div r5,r6.*
|
||||
.*divu r7,a0.*
|
||||
.*dmulh d1,d0.*
|
||||
.*dmulhu a3,a2.*
|
||||
.*dmulh 2147417596,r2.*
|
||||
.*dmulhu 2147417596,r2.*
|
||||
.*mul r1,r2,r3,r4.*
|
||||
.*mulu r1,r2,r3,r4.*
|
||||
.*$gdb_prompt $" { pass "muldiv tests" }
|
||||
-re "$gdb_prompt $" { fail "muldiv tests" }
|
||||
timeout { fail "(timeout) muldiv tests" }
|
||||
}
|
||||
}
|
||||
|
||||
proc movbu_tests { } {
|
||||
global gdb_prompt
|
||||
global hex
|
||||
global decimal
|
||||
|
||||
send_gdb "x/20i movbu_tests\n"
|
||||
gdb_expect {
|
||||
-re "
|
||||
.*movbu \\(r5\\),r6.*
|
||||
.*movbu r7,\\(a0\\).*
|
||||
.*movbu \\(sp\\),r7.*
|
||||
.*movbu a0,\\(sp\\).*
|
||||
.*movbu \\(16,r1\\),r2.*
|
||||
.*movbu r2,\\(16,r1\\).*
|
||||
.*movbu \\(16,sp\\),r2.*
|
||||
.*movbu r2,\\(16,sp\\).*
|
||||
.*movbu \\(2096895,r1\\),r2.*
|
||||
.*movbu r2,\\(2096895,r1\\).*
|
||||
.*movbu \\(2096895,sp\\),r2.*
|
||||
.*movbu r2,\\(2096895,sp\\).*
|
||||
.*movbu \\(0x1ffeff\\),r2.*
|
||||
.*movbu r2,\\(0x1ffeff\\).*
|
||||
.*movbu \\(2147417596,r1\\),r2.*
|
||||
.*movbu r2,\\(2147417596,r1\\).*
|
||||
.*movbu \\(2147417596,sp\\),r2.*
|
||||
.*movbu r2,\\(2147417596,sp\\).*
|
||||
.*movbu \\(0x7ffefdfc\\),r2.*
|
||||
.*movbu r2,\\(0x7ffefdfc\\).*
|
||||
.*$gdb_prompt $" { pass "movbu tests" }
|
||||
-re "$gdb_prompt $" { fail "movbu tests" }
|
||||
timeout { fail "(timeout) movbu tests" }
|
||||
}
|
||||
}
|
||||
|
||||
proc movhu_tests { } {
|
||||
global gdb_prompt
|
||||
global hex
|
||||
global decimal
|
||||
|
||||
send_gdb "x/20i movhu_tests\n"
|
||||
gdb_expect {
|
||||
-re "
|
||||
.*movhu \\(a1\\),a2.*
|
||||
.*movhu a3,\\(d0\\).*
|
||||
.*movhu \\(sp\\),a1.*
|
||||
.*movhu a2,\\(sp\\).*
|
||||
.*movhu \\(16,r1\\),r2.*
|
||||
.*movhu r2,\\(16,r1\\).*
|
||||
.*movhu \\(16,sp\\),r2.*
|
||||
.*movhu r2,\\(16,sp\\).*
|
||||
.*movhu \\(2096895,r1\\),r2.*
|
||||
.*movhu r2,\\(2096895,r1\\).*
|
||||
.*movhu \\(2096895,sp\\),r2.*
|
||||
.*movhu r2,\\(2096895,sp\\).*
|
||||
.*movhu \\(0x1ffeff\\),r2.*
|
||||
.*movhu r2,\\(0x1ffeff\\).*
|
||||
.*movhu \\(2147417596,r1\\),r2.*
|
||||
.*movhu r2,\\(2147417596,r1\\).*
|
||||
.*movhu \\(2147417596,sp\\),r2.*
|
||||
.*movhu r2,\\(2147417596,sp\\).*
|
||||
.*movhu \\(0x7ffefdfc\\),r2.*
|
||||
.*movhu r2,\\(0x7ffefdfc\\).*
|
||||
.*$gdb_prompt $" { pass "movhu tests" }
|
||||
-re "$gdb_prompt $" { fail "movhu tests" }
|
||||
timeout { fail "(timeout) movhu tests" }
|
||||
}
|
||||
}
|
||||
|
||||
proc mac_tests { } {
|
||||
global gdb_prompt
|
||||
global hex
|
||||
global decimal
|
||||
|
||||
send_gdb "x/28i mac_tests\n"
|
||||
gdb_expect {
|
||||
-re "
|
||||
.*mac r1,r2.*
|
||||
.*macu r3,r4.*
|
||||
.*macb r5,r6.*
|
||||
.*macbu r7,a0.*
|
||||
.*mach a1,a2.*
|
||||
.*machu a3,d0.*
|
||||
.*dmach d1,d2.*
|
||||
.*dmachu d3,d2.*
|
||||
.*mac 16,r1.*
|
||||
.*macu 16,r1.*
|
||||
.*macb 16,r1.*
|
||||
.*macbu 16,r1.*
|
||||
.*mach 16,r1.*
|
||||
.*machu 16,r1.*
|
||||
.*mac 2096895,r2.*
|
||||
.*macu 2096895,r2.*
|
||||
.*macb 2096895,r2.*
|
||||
.*macbu 2096895,r2.*
|
||||
.*mach 2096895,r2.*
|
||||
.*machu 2096895,r2.*
|
||||
.*mac 2147417596,r2.*
|
||||
.*macu 2147417596,r2.*
|
||||
.*macb 2147417596,r2.*
|
||||
.*macbu 2147417596,r2.*
|
||||
.*mach 2147417596,r2.*
|
||||
.*machu 2147417596,r2.*
|
||||
.*dmach 2147417596,r2.*
|
||||
.*dmachu 2147417596,r2.*
|
||||
.*$gdb_prompt $" { pass "mac tests" }
|
||||
-re "$gdb_prompt $" { fail "mac tests" }
|
||||
timeout { fail "(timeout) mac tests" }
|
||||
}
|
||||
}
|
||||
|
||||
proc bit_tests { } {
|
||||
global gdb_prompt
|
||||
global hex
|
||||
global decimal
|
||||
|
||||
send_gdb "x/4i bit_tests\n"
|
||||
gdb_expect {
|
||||
-re "
|
||||
.*bsch r1,r2.*
|
||||
.*btst 16,r1.*
|
||||
.*btst 2096895,r2.*
|
||||
.*btst 2147417596,r2.*
|
||||
.*$gdb_prompt $" { pass "bit tests" }
|
||||
-re "$gdb_prompt $" { fail "bit tests" }
|
||||
timeout { fail "(timeout) bit tests" }
|
||||
}
|
||||
}
|
||||
|
||||
proc dsp_add_tests { } {
|
||||
global gdb_prompt
|
||||
global hex
|
||||
global decimal
|
||||
|
||||
send_gdb "x/28i dsp_add_tests\n"
|
||||
gdb_expect {
|
||||
-re "
|
||||
.*add_add r4,r1,r2,r3.*
|
||||
.*add_add r4,r1,2,r3.*
|
||||
.*add_sub r4,r1,r2,r3.*
|
||||
.*add_sub r4,r1,2,r3.*
|
||||
.*add_cmp r4,r1,r2,r3.*
|
||||
.*add_cmp r4,r1,2,r3.*
|
||||
.*add_mov r4,r1,r2,r3.*
|
||||
.*add_mov r4,r1,2,r3.*
|
||||
.*add_asr r4,r1,r2,r3.*
|
||||
.*add_asr r4,r1,2,r3.*
|
||||
.*add_lsr r4,r1,r2,r3.*
|
||||
.*add_lsr r4,r1,2,r3.*
|
||||
.*add_asl r4,r1,r2,r3.*
|
||||
.*add_asl r4,r1,2,r3.*
|
||||
.*add_add 4,r1,r2,r3.*
|
||||
.*add_add 4,r1,2,r3.*
|
||||
.*add_sub 4,r1,r2,r3.*
|
||||
.*add_sub 4,r1,2,r3.*
|
||||
.*add_cmp 4,r1,r2,r3.*
|
||||
.*add_cmp 4,r1,2,r3.*
|
||||
.*add_mov 4,r1,r2,r3.*
|
||||
.*add_mov 4,r1,2,r3.*
|
||||
.*add_asr 4,r1,r2,r3.*
|
||||
.*add_asr 4,r1,2,r3.*
|
||||
.*add_lsr 4,r1,r2,r3.*
|
||||
.*add_lsr 4,r1,2,r3.*
|
||||
.*add_asl 4,r1,r2,r3.*
|
||||
.*add_asl 4,r1,2,r3.*
|
||||
.*$gdb_prompt $" { pass "dsp_add tests" }
|
||||
-re "$gdb_prompt $" { fail "dsp_add tests" }
|
||||
timeout { fail "(timeout) dsp_add tests" }
|
||||
}
|
||||
}
|
||||
|
||||
proc dsp_cmp_tests { } {
|
||||
global gdb_prompt
|
||||
global hex
|
||||
global decimal
|
||||
|
||||
send_gdb "x/24i dsp_cmp_tests\n"
|
||||
gdb_expect {
|
||||
-re "
|
||||
.*cmp_add r4,r1,r2,r3.*
|
||||
.*cmp_add r4,r1,2,r3.*
|
||||
.*cmp_sub r4,r1,r2,r3.*
|
||||
.*cmp_sub r4,r1,2,r3.*
|
||||
.*cmp_mov r4,r1,r2,r3.*
|
||||
.*cmp_mov r4,r1,2,r3.*
|
||||
.*cmp_asr r4,r1,r2,r3.*
|
||||
.*cmp_asr r4,r1,2,r3.*
|
||||
.*cmp_lsr r4,r1,r2,r3.*
|
||||
.*cmp_lsr r4,r1,2,r3.*
|
||||
.*cmp_asl r4,r1,r2,r3.*
|
||||
.*cmp_asl r4,r1,2,r3.*
|
||||
.*cmp_add 4,r1,r2,r3.*
|
||||
.*cmp_add 4,r1,2,r3.*
|
||||
.*cmp_sub 4,r1,r2,r3.*
|
||||
.*cmp_sub 4,r1,2,r3.*
|
||||
.*cmp_mov 4,r1,r2,r3.*
|
||||
.*cmp_mov 4,r1,2,r3.*
|
||||
.*cmp_asr 4,r1,r2,r3.*
|
||||
.*cmp_asr 4,r1,2,r3.*
|
||||
.*cmp_lsr 4,r1,r2,r3.*
|
||||
.*cmp_lsr 4,r1,2,r3.*
|
||||
.*cmp_asl 4,r1,r2,r3.*
|
||||
.*cmp_asl 4,r1,2,r3.*
|
||||
.*$gdb_prompt $" { pass "dsp_cmp tests" }
|
||||
-re "$gdb_prompt $" { fail "dsp_cmp tests" }
|
||||
timeout { fail "(timeout) dsp_cmp tests" }
|
||||
}
|
||||
}
|
||||
|
||||
proc dsp_sub_tests { } {
|
||||
global gdb_prompt
|
||||
global hex
|
||||
global decimal
|
||||
|
||||
send_gdb "x/28i dsp_sub_tests\n"
|
||||
gdb_expect {
|
||||
-re "
|
||||
.*sub_add r4,r1,r2,r3.*
|
||||
.*sub_add r4,r1,2,r3.*
|
||||
.*sub_sub r4,r1,r2,r3.*
|
||||
.*sub_sub r4,r1,2,r3.*
|
||||
.*sub_cmp r4,r1,r2,r3.*
|
||||
.*sub_cmp r4,r1,2,r3.*
|
||||
.*sub_mov r4,r1,r2,r3.*
|
||||
.*sub_mov r4,r1,2,r3.*
|
||||
.*sub_asr r4,r1,r2,r3.*
|
||||
.*sub_asr r4,r1,2,r3.*
|
||||
.*sub_lsr r4,r1,r2,r3.*
|
||||
.*sub_lsr r4,r1,2,r3.*
|
||||
.*sub_asl r4,r1,r2,r3.*
|
||||
.*sub_asl r4,r1,2,r3.*
|
||||
.*sub_add 4,r1,r2,r3.*
|
||||
.*sub_add 4,r1,2,r3.*
|
||||
.*sub_sub 4,r1,r2,r3.*
|
||||
.*sub_sub 4,r1,2,r3.*
|
||||
.*sub_cmp 4,r1,r2,r3.*
|
||||
.*sub_cmp 4,r1,2,r3.*
|
||||
.*sub_mov 4,r1,r2,r3.*
|
||||
.*sub_mov 4,r1,2,r3.*
|
||||
.*sub_asr 4,r1,r2,r3.*
|
||||
.*sub_asr 4,r1,2,r3.*
|
||||
.*sub_lsr 4,r1,r2,r3.*
|
||||
.*sub_lsr 4,r1,2,r3.*
|
||||
.*sub_asl 4,r1,r2,r3.*
|
||||
.*sub_asl 4,r1,2,r3.*
|
||||
.*$gdb_prompt $" { pass "dsp_sub tests" }
|
||||
-re "$gdb_prompt $" { fail "dsp_sub tests" }
|
||||
timeout { fail "(timeout) dsp_sub tests" }
|
||||
}
|
||||
}
|
||||
|
||||
proc dsp_mov_tests { } {
|
||||
global gdb_prompt
|
||||
global hex
|
||||
global decimal
|
||||
|
||||
send_gdb "x/28i dsp_mov_tests\n"
|
||||
gdb_expect {
|
||||
-re "
|
||||
.*mov_add r4,r1,r2,r3.*
|
||||
.*mov_add r4,r1,2,r3.*
|
||||
.*mov_sub r4,r1,r2,r3.*
|
||||
.*mov_sub r4,r1,2,r3.*
|
||||
.*mov_cmp r4,r1,r2,r3.*
|
||||
.*mov_cmp r4,r1,2,r3.*
|
||||
.*mov_mov r4,r1,r2,r3.*
|
||||
.*mov_mov r4,r1,2,r3.*
|
||||
.*mov_asr r4,r1,r2,r3.*
|
||||
.*mov_asr r4,r1,2,r3.*
|
||||
.*mov_lsr r4,r1,r2,r3.*
|
||||
.*mov_lsr r4,r1,2,r3.*
|
||||
.*mov_asl r4,r1,r2,r3.*
|
||||
.*mov_asl r4,r1,2,r3.*
|
||||
.*mov_add 4,r1,r2,r3.*
|
||||
.*mov_add 4,r1,2,r3.*
|
||||
.*mov_sub 4,r1,r2,r3.*
|
||||
.*mov_sub 4,r1,2,r3.*
|
||||
.*mov_cmp 4,r1,r2,r3.*
|
||||
.*mov_cmp 4,r1,2,r3.*
|
||||
.*mov_mov 4,r1,r2,r3.*
|
||||
.*mov_mov 4,r1,2,r3.*
|
||||
.*mov_asr 4,r1,r2,r3.*
|
||||
.*mov_asr 4,r1,2,r3.*
|
||||
.*mov_lsr 4,r1,r2,r3.*
|
||||
.*mov_lsr 4,r1,2,r3.*
|
||||
.*mov_asl 4,r1,r2,r3.*
|
||||
.*mov_asl 4,r1,2,r3.*
|
||||
.*$gdb_prompt $" { pass "dsp_mov tests" }
|
||||
-re "$gdb_prompt $" { fail "dsp_mov tests" }
|
||||
timeout { fail "(timeout) dsp_mov tests" }
|
||||
}
|
||||
}
|
||||
|
||||
proc dsp_logical_tests { } {
|
||||
global gdb_prompt
|
||||
global hex
|
||||
global decimal
|
||||
|
||||
send_gdb "x/42i dsp_logical_tests\n"
|
||||
gdb_expect {
|
||||
-re "
|
||||
.*and_add r4,r1,r2,r3.*
|
||||
.*and_add r4,r1,2,r3.*
|
||||
.*and_sub r4,r1,r2,r3.*
|
||||
.*and_sub r4,r1,2,r3.*
|
||||
.*and_cmp r4,r1,r2,r3.*
|
||||
.*and_cmp r4,r1,2,r3.*
|
||||
.*and_mov r4,r1,r2,r3.*
|
||||
.*and_mov r4,r1,2,r3.*
|
||||
.*and_asr r4,r1,r2,r3.*
|
||||
.*and_asr r4,r1,2,r3.*
|
||||
.*and_lsr r4,r1,r2,r3.*
|
||||
.*and_lsr r4,r1,2,r3.*
|
||||
.*and_asl r4,r1,r2,r3.*
|
||||
.*and_asl r4,r1,2,r3.*
|
||||
.*xor_add r4,r1,r2,r3.*
|
||||
.*xor_add r4,r1,2,r3.*
|
||||
.*xor_sub r4,r1,r2,r3.*
|
||||
.*xor_sub r4,r1,2,r3.*
|
||||
.*xor_cmp r4,r1,r2,r3.*
|
||||
.*xor_cmp r4,r1,2,r3.*
|
||||
.*xor_mov r4,r1,r2,r3.*
|
||||
.*xor_mov r4,r1,2,r3.*
|
||||
.*xor_asr r4,r1,r2,r3.*
|
||||
.*xor_asr r4,r1,2,r3.*
|
||||
.*xor_lsr r4,r1,r2,r3.*
|
||||
.*xor_lsr r4,r1,2,r3.*
|
||||
.*xor_asl r4,r1,r2,r3.*
|
||||
.*xor_asl r4,r1,2,r3.*
|
||||
.*or_add r4,r1,r2,r3.*
|
||||
.*or_add r4,r1,2,r3.*
|
||||
.*or_sub r4,r1,r2,r3.*
|
||||
.*or_sub r4,r1,2,r3.*
|
||||
.*or_cmp r4,r1,r2,r3.*
|
||||
.*or_cmp r4,r1,2,r3.*
|
||||
.*or_mov r4,r1,r2,r3.*
|
||||
.*or_mov r4,r1,2,r3.*
|
||||
.*or_asr r4,r1,r2,r3.*
|
||||
.*or_asr r4,r1,2,r3.*
|
||||
.*or_lsr r4,r1,r2,r3.*
|
||||
.*or_lsr r4,r1,2,r3.*
|
||||
.*or_asl r4,r1,r2,r3.*
|
||||
.*or_asl r4,r1,2,r3.*
|
||||
.*$gdb_prompt $" { pass "dsp_logical tests" }
|
||||
-re "$gdb_prompt $" { fail "dsp_logical tests" }
|
||||
timeout { fail "(timeout) dsp_logical tests" }
|
||||
}
|
||||
}
|
||||
|
||||
proc dsp_misc_tests { } {
|
||||
global gdb_prompt
|
||||
global hex
|
||||
global decimal
|
||||
|
||||
send_gdb "x/42i dsp_misc_tests\n"
|
||||
gdb_expect {
|
||||
-re "
|
||||
.*dmach_add r4,r1,r2,r3.*
|
||||
.*dmach_add r4,r1,2,r3.*
|
||||
.*dmach_sub r4,r1,r2,r3.*
|
||||
.*dmach_sub r4,r1,2,r3.*
|
||||
.*dmach_cmp r4,r1,r2,r3.*
|
||||
.*dmach_cmp r4,r1,2,r3.*
|
||||
.*dmach_mov r4,r1,r2,r3.*
|
||||
.*dmach_mov r4,r1,2,r3.*
|
||||
.*dmach_asr r4,r1,r2,r3.*
|
||||
.*dmach_asr r4,r1,2,r3.*
|
||||
.*dmach_lsr r4,r1,r2,r3.*
|
||||
.*dmach_lsr r4,r1,2,r3.*
|
||||
.*dmach_asl r4,r1,r2,r3.*
|
||||
.*dmach_asl r4,r1,2,r3.*
|
||||
.*swhw_add r4,r1,r2,r3.*
|
||||
.*swhw_add r4,r1,2,r3.*
|
||||
.*swhw_sub r4,r1,r2,r3.*
|
||||
.*swhw_sub r4,r1,2,r3.*
|
||||
.*swhw_cmp r4,r1,r2,r3.*
|
||||
.*swhw_cmp r4,r1,2,r3.*
|
||||
.*swhw_mov r4,r1,r2,r3.*
|
||||
.*swhw_mov r4,r1,2,r3.*
|
||||
.*swhw_asr r4,r1,r2,r3.*
|
||||
.*swhw_asr r4,r1,2,r3.*
|
||||
.*swhw_lsr r4,r1,r2,r3.*
|
||||
.*swhw_lsr r4,r1,2,r3.*
|
||||
.*swhw_asl r4,r1,r2,r3.*
|
||||
.*swhw_asl r4,r1,2,r3.*
|
||||
.*sat16_add r4,r1,r2,r3.*
|
||||
.*sat16_add r4,r1,2,r3.*
|
||||
.*sat16_sub r4,r1,r2,r3.*
|
||||
.*sat16_sub r4,r1,2,r3.*
|
||||
.*sat16_cmp r4,r1,r2,r3.*
|
||||
.*sat16_cmp r4,r1,2,r3.*
|
||||
.*sat16_mov r4,r1,r2,r3.*
|
||||
.*sat16_mov r4,r1,2,r3.*
|
||||
.*sat16_asr r4,r1,r2,r3.*
|
||||
.*sat16_asr r4,r1,2,r3.*
|
||||
.*sat16_lsr r4,r1,r2,r3.*
|
||||
.*sat16_lsr r4,r1,2,r3.*
|
||||
.*sat16_asl r4,r1,r2,r3.*
|
||||
.*sat16_asl r4,r1,2,r3.*
|
||||
.*$gdb_prompt $" { pass "dsp_misc tests" }
|
||||
-re "$gdb_prompt $" { fail "dsp_misc tests" }
|
||||
timeout { fail "(timeout) dsp_misc tests" }
|
||||
}
|
||||
}
|
||||
|
||||
proc autoincrement_tests { } {
|
||||
global gdb_prompt
|
||||
global hex
|
||||
global decimal
|
||||
|
||||
send_gdb "x/16i autoincrement_tests\n"
|
||||
gdb_expect {
|
||||
-re "
|
||||
.*mov \\(r1\\+\\),r2.*
|
||||
.*mov r3,\\(r4\\+\\).*
|
||||
.*movhu \\(r6\\+\\),r7.*
|
||||
.*movhu a0,\\(a1\\+\\).*
|
||||
.*mov \\(r1\\+,64\\),r2.*
|
||||
.*mov r1,\\(r2\\+,64\\).*
|
||||
.*movhu \\(r1\\+,64\\),r2.*
|
||||
.*movhu r1,\\(r2\\+,64\\).*
|
||||
.*mov \\(r1\\+,131055\\),r2.*
|
||||
.*mov r1,\\(r2\\+,131055\\).*
|
||||
.*movhu \\(r1\\+,131055\\),r2.*
|
||||
.*movhu r1,\\(r2\\+,131055\\).*
|
||||
.*mov \\(r1\\+,2147417596\\),r2.*
|
||||
.*mov r1,\\(r2\\+,2147417596\\).*
|
||||
.*movhu \\(r1\\+,2147417596\\),r2.*
|
||||
.*movhu r1,\\(r2\\+,2147417596\\).*
|
||||
.*$gdb_prompt $" { pass "autoincrement tests" }
|
||||
-re "$gdb_prompt $" { fail "autoincrement tests" }
|
||||
timeout { fail "(timeout) autoincrement tests" }
|
||||
}
|
||||
}
|
||||
|
||||
proc dsp_autoincrement_tests { } {
|
||||
global gdb_prompt
|
||||
global hex
|
||||
global decimal
|
||||
|
||||
send_gdb "x/11i dsp_autoincrement_tests\n"
|
||||
gdb_expect {
|
||||
-re "
|
||||
.*mov_llt \\(r1\\+,4\\),r2.*
|
||||
.*mov_lgt \\(r1\\+,4\\),r2.*
|
||||
.*mov_lge \\(r1\\+,4\\),r2.*
|
||||
.*mov_lle \\(r1\\+,4\\),r2.*
|
||||
.*mov_lcs \\(r1\\+,4\\),r2.*
|
||||
.*mov_lhi \\(r1\\+,4\\),r2.*
|
||||
.*mov_lcc \\(r1\\+,4\\),r2.*
|
||||
.*mov_lls \\(r1\\+,4\\),r2.*
|
||||
.*mov_leq \\(r1\\+,4\\),r2.*
|
||||
.*mov_lne \\(r1\\+,4\\),r2.*
|
||||
.*mov_lra \\(r1\\+,4\\),r2.*
|
||||
.*$gdb_prompt $" { pass "autoincrement tests" }
|
||||
-re "$gdb_prompt $" { fail "autoincrement tests" }
|
||||
timeout { fail "(timeout) autoincrement tests" }
|
||||
}
|
||||
}
|
||||
|
||||
# Start with a fresh gdb.
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load $binfile
|
||||
|
||||
call_tests
|
||||
movm_tests
|
||||
misc_tests
|
||||
mov_tests
|
||||
ext_tests
|
||||
add_tests
|
||||
sub_tests
|
||||
cmp_tests
|
||||
logical_tests
|
||||
shift_tests
|
||||
muldiv_tests
|
||||
movbu_tests
|
||||
movhu_tests
|
||||
mac_tests
|
||||
bit_tests
|
||||
dsp_add_tests
|
||||
dsp_cmp_tests
|
||||
dsp_sub_tests
|
||||
dsp_mov_tests
|
||||
dsp_logical_tests
|
||||
autoincrement_tests
|
||||
dsp_autoincrement_tests
|
524
gdb/testsuite/gdb.disasm/am33.s
Normal file
524
gdb/testsuite/gdb.disasm/am33.s
Normal file
@ -0,0 +1,524 @@
|
||||
|
||||
.globl _main
|
||||
.globl call_tests
|
||||
.globl movm_tests
|
||||
.globl misc_tests
|
||||
.globl mov_tests
|
||||
.globl ext_tests
|
||||
.globl add_tests
|
||||
.globl sub_tests
|
||||
.globl cmp_tests
|
||||
.globl logical_tests
|
||||
.globl shift_tests
|
||||
.globl muldiv_tests
|
||||
.globl movbu_tests
|
||||
.globl movhu_tests
|
||||
.globl mac_tests
|
||||
.globl bit_tests
|
||||
.globl dsp_add_tests
|
||||
.globl dsp_cmp_tests
|
||||
.globl dsp_sub_tests
|
||||
.globl dsp_mov_tests
|
||||
.globl dsp_logical_tests
|
||||
.globl dsp_misc_tests
|
||||
.globl autoincrement_tests
|
||||
.globl dsp_autoincrement_tests
|
||||
|
||||
.text
|
||||
.am33
|
||||
_main:
|
||||
call_tests:
|
||||
call 256,[a2,a3,exreg0],9
|
||||
call 256,[a2,a3,exreg1],9
|
||||
call 256,[a2,a3,exother],9
|
||||
call 256,[a2,a3,all],9
|
||||
call 131071,[a2,a3,exreg0],9
|
||||
call 131071,[a2,a3,exreg1],9
|
||||
call 131071,[a2,a3,exother],9
|
||||
call 131071,[a2,a3,all],9
|
||||
|
||||
movm_tests:
|
||||
movm (sp),[a2,a3,exreg0]
|
||||
movm (sp),[a2,a3,exreg1]
|
||||
movm (sp),[a2,a3,exother]
|
||||
movm (sp),[a2,a3,all]
|
||||
movm [a2,a3,exreg0],(sp)
|
||||
movm [a2,a3,exreg1],(sp)
|
||||
movm [a2,a3,exother],(sp)
|
||||
movm [a2,a3,all],(sp)
|
||||
movm (usp),[a2,a3,exreg0]
|
||||
movm (usp),[a2,a3,exreg1]
|
||||
movm (usp),[a2,a3,exother]
|
||||
movm (usp),[a2,a3,all]
|
||||
movm [a2,a3,exreg0],(usp)
|
||||
movm [a2,a3,exreg1],(usp)
|
||||
movm [a2,a3,exother],(usp)
|
||||
movm [a2,a3,all],(usp)
|
||||
|
||||
misc_tests:
|
||||
syscall 0x4
|
||||
mcst9 d0
|
||||
mcst48 d1
|
||||
getchx d0
|
||||
getclx d1
|
||||
clr r9
|
||||
sat16 r9,r8
|
||||
mcste r7,r6
|
||||
swap r5,r4
|
||||
swaph r3,r2
|
||||
swhw r1,r0
|
||||
|
||||
|
||||
mov_tests:
|
||||
mov r0,r1
|
||||
mov xr0, r1
|
||||
mov r1, xr2
|
||||
mov (r1),r2
|
||||
mov r3,(r4)
|
||||
mov (sp),r5
|
||||
mov r6,(sp)
|
||||
mov 16,r1
|
||||
mov 16,xr1
|
||||
mov (16,r1),r2
|
||||
mov r2,(16,r1)
|
||||
mov (16,sp),r2
|
||||
mov r2,(16,sp)
|
||||
mov 0x1ffeff,r2
|
||||
mov 0x1ffeff,xr2
|
||||
mov (0x1ffeff,r1),r2
|
||||
mov r2,(0x1ffeff,r1)
|
||||
mov (0x1ffeff,sp),r2
|
||||
mov r2,(0x1ffeff,sp)
|
||||
mov (0x1ffeff),r2
|
||||
mov r2,(0x1ffeff)
|
||||
mov 0x7ffefdfc,r2
|
||||
mov 0x7ffefdfc,xr2
|
||||
mov (0x7ffefdfc,r1),r2
|
||||
mov r2,(0x7ffefdfc,r1)
|
||||
mov (0x7ffefdfc,sp),r2
|
||||
mov r2,(0x7ffefdfc,sp)
|
||||
mov (0x7ffefdfc),r2
|
||||
mov r2,(0x7ffefdfc)
|
||||
movu 16,r1
|
||||
movu 0x1ffeff,r2
|
||||
movu 0x7ffefdfc,r2
|
||||
mov usp,a0
|
||||
mov ssp,a1
|
||||
mov msp,a2
|
||||
mov pc,a3
|
||||
mov a0,usp
|
||||
mov a1,ssp
|
||||
mov a2,msp
|
||||
mov epsw,d0
|
||||
mov d1,epsw
|
||||
mov a0,r1
|
||||
mov d2,r3
|
||||
mov r5,a1
|
||||
mov r7,d3
|
||||
|
||||
ext_tests:
|
||||
ext r2
|
||||
extb r3,r4
|
||||
extbu r4,r5
|
||||
exth r6,r7
|
||||
exthu r7,r8
|
||||
|
||||
add_tests:
|
||||
add r10,r11
|
||||
add 16,r1
|
||||
add 0x1ffeff,r2
|
||||
add 0x7ffefdfc,r2
|
||||
add r1,r2,r3
|
||||
addc r12,r13
|
||||
addc 16,r1
|
||||
addc 0x1ffeff,r2
|
||||
addc 0x7ffefdfc,r2
|
||||
inc r13
|
||||
inc4 r12
|
||||
|
||||
|
||||
sub_tests:
|
||||
sub r14,r15
|
||||
sub 16,r1
|
||||
sub 0x1ffeff,r2
|
||||
sub 0x7ffefdfc,r2
|
||||
subc r15,r14
|
||||
subc 16,r1
|
||||
subc 0x1ffeff,r2
|
||||
subc 0x7ffefdfc,r2
|
||||
|
||||
cmp_tests:
|
||||
cmp r11,r10
|
||||
cmp 16,r1
|
||||
cmp 0x1ffeff,r2
|
||||
cmp 0x7ffefdfc,r2
|
||||
|
||||
logical_tests:
|
||||
and r0,r1
|
||||
or r2,r3
|
||||
xor r4,r5
|
||||
not r6
|
||||
and 16,r1
|
||||
or 16,r1
|
||||
xor 16,r1
|
||||
and 0x1ffeff,r2
|
||||
or 0x1ffeff,r2
|
||||
xor 0x1ffeff,r2
|
||||
and 0x7ffefdfc,r2
|
||||
or 0x7ffefdfc,r2
|
||||
xor 0x7ffefdfc,r2
|
||||
and 131072,epsw
|
||||
or 65535,epsw
|
||||
|
||||
shift_tests:
|
||||
asr r7,r8
|
||||
lsr r9,r10
|
||||
asl r11,r12
|
||||
asl2 r13
|
||||
ror r14
|
||||
rol r15
|
||||
asr 16,r1
|
||||
lsr 16,r1
|
||||
asl 16,r1
|
||||
asr 0x1ffeff,r2
|
||||
lsr 0x1ffeff,r2
|
||||
asl 0x1ffeff,r2
|
||||
asr 0x7ffefdfc,r2
|
||||
lsr 0x7ffefdfc,r2
|
||||
asl 0x7ffefdfc,r2
|
||||
|
||||
muldiv_tests:
|
||||
mul r1,r2
|
||||
mulu r3,r4
|
||||
mul 16,r1
|
||||
mulu 16,r1
|
||||
mul 0x1ffeff,r2
|
||||
mulu 0x1ffeff,r2
|
||||
mul 0x7ffefdfc,r2
|
||||
mulu 0x7ffefdfc,r2
|
||||
div r5,r6
|
||||
divu r7,r8
|
||||
dmulh r13,r12
|
||||
dmulhu r11,r10
|
||||
dmulh 0x7ffefdfc,r2
|
||||
dmulhu 0x7ffefdfc,r2
|
||||
mul r1,r2,r3,r4
|
||||
mulu r1,r2,r3,r4
|
||||
|
||||
movbu_tests:
|
||||
movbu (r5),r6
|
||||
movbu r7,(r8)
|
||||
movbu (sp),r7
|
||||
movbu r8,(sp)
|
||||
movbu (16,r1),r2
|
||||
movbu r2,(16,r1)
|
||||
movbu (16,sp),r2
|
||||
movbu r2,(16,sp)
|
||||
movbu (0x1ffeff,r1),r2
|
||||
movbu r2,(0x1ffeff,r1)
|
||||
movbu (0x1ffeff,sp),r2
|
||||
movbu r2,(0x1ffeff,sp)
|
||||
movbu (0x1ffeff),r2
|
||||
movbu r2,(0x1ffeff)
|
||||
movbu (0x7ffefdfc,r1),r2
|
||||
movbu r2,(0x7ffefdfc,r1)
|
||||
movbu (0x7ffefdfc,sp),r2
|
||||
movbu r2,(0x7ffefdfc,sp)
|
||||
movbu (0x7ffefdfc),r2
|
||||
movbu r2,(0x7ffefdfc)
|
||||
|
||||
movhu_tests:
|
||||
movhu (r9),r10
|
||||
movhu r11,(r12)
|
||||
movhu (sp),r9
|
||||
movhu r10,(sp)
|
||||
movhu (16,r1),r2
|
||||
movhu r2,(16,r1)
|
||||
movhu (16,sp),r2
|
||||
movhu r2,(16,sp)
|
||||
movhu (0x1ffeff,r1),r2
|
||||
movhu r2,(0x1ffeff,r1)
|
||||
movhu (0x1ffeff,sp),r2
|
||||
movhu r2,(0x1ffeff,sp)
|
||||
movhu (0x1ffeff),r2
|
||||
movhu r2,(0x1ffeff)
|
||||
movhu (0x7ffefdfc,r1),r2
|
||||
movhu r2,(0x7ffefdfc,r1)
|
||||
movhu (0x7ffefdfc,sp),r2
|
||||
movhu r2,(0x7ffefdfc,sp)
|
||||
movhu (0x7ffefdfc),r2
|
||||
movhu r2,(0x7ffefdfc)
|
||||
|
||||
|
||||
mac_tests:
|
||||
mac r1,r2
|
||||
macu r3,r4
|
||||
macb r5,r6
|
||||
macbu r7,r8
|
||||
mach r9,r10
|
||||
machu r11,r12
|
||||
dmach r13,r14
|
||||
dmachu r15,r14
|
||||
mac 16,r1
|
||||
macu 16,r1
|
||||
macb 16,r1
|
||||
macbu 16,r1
|
||||
mach 16,r1
|
||||
machu 16,r1
|
||||
mac 0x1ffeff,r2
|
||||
macu 0x1ffeff,r2
|
||||
macb 0x1ffeff,r2
|
||||
macbu 0x1ffeff,r2
|
||||
mach 0x1ffeff,r2
|
||||
machu 0x1ffeff,r2
|
||||
mac 0x7ffefdfc,r2
|
||||
macu 0x7ffefdfc,r2
|
||||
macb 0x7ffefdfc,r2
|
||||
macbu 0x7ffefdfc,r2
|
||||
mach 0x7ffefdfc,r2
|
||||
machu 0x7ffefdfc,r2
|
||||
dmach 0x7ffefdfc,r2
|
||||
dmachu 0x7ffefdfc,r2
|
||||
|
||||
bit_tests:
|
||||
bsch r1,r2
|
||||
btst 16,r1
|
||||
btst 0x1ffeff,r2
|
||||
btst 0x7ffefdfc,r2
|
||||
|
||||
|
||||
|
||||
dsp_add_tests:
|
||||
add_add r4,r1,r2,r3
|
||||
add_add r4,r1,2,r3
|
||||
add_sub r4,r1,r2,r3
|
||||
add_sub r4,r1,2,r3
|
||||
add_cmp r4,r1,r2,r3
|
||||
add_cmp r4,r1,2,r3
|
||||
add_mov r4,r1,r2,r3
|
||||
add_mov r4,r1,2,r3
|
||||
add_asr r4,r1,r2,r3
|
||||
add_asr r4,r1,2,r3
|
||||
add_lsr r4,r1,r2,r3
|
||||
add_lsr r4,r1,2,r3
|
||||
add_asl r4,r1,r2,r3
|
||||
add_asl r4,r1,2,r3
|
||||
add_add 4,r1,r2,r3
|
||||
add_add 4,r1,2,r3
|
||||
add_sub 4,r1,r2,r3
|
||||
add_sub 4,r1,2,r3
|
||||
add_cmp 4,r1,r2,r3
|
||||
add_cmp 4,r1,2,r3
|
||||
add_mov 4,r1,r2,r3
|
||||
add_mov 4,r1,2,r3
|
||||
add_asr 4,r1,r2,r3
|
||||
add_asr 4,r1,2,r3
|
||||
add_lsr 4,r1,r2,r3
|
||||
add_lsr 4,r1,2,r3
|
||||
add_asl 4,r1,r2,r3
|
||||
add_asl 4,r1,2,r3
|
||||
|
||||
dsp_cmp_tests:
|
||||
cmp_add r4,r1,r2,r3
|
||||
cmp_add r4,r1,2,r3
|
||||
cmp_sub r4,r1,r2,r3
|
||||
cmp_sub r4,r1,2,r3
|
||||
cmp_mov r4,r1,r2,r3
|
||||
cmp_mov r4,r1,2,r3
|
||||
cmp_asr r4,r1,r2,r3
|
||||
cmp_asr r4,r1,2,r3
|
||||
cmp_lsr r4,r1,r2,r3
|
||||
cmp_lsr r4,r1,2,r3
|
||||
cmp_asl r4,r1,r2,r3
|
||||
cmp_asl r4,r1,2,r3
|
||||
cmp_add 4,r1,r2,r3
|
||||
cmp_add 4,r1,2,r3
|
||||
cmp_sub 4,r1,r2,r3
|
||||
cmp_sub 4,r1,2,r3
|
||||
cmp_mov 4,r1,r2,r3
|
||||
cmp_mov 4,r1,2,r3
|
||||
cmp_asr 4,r1,r2,r3
|
||||
cmp_asr 4,r1,2,r3
|
||||
cmp_lsr 4,r1,r2,r3
|
||||
cmp_lsr 4,r1,2,r3
|
||||
cmp_asl 4,r1,r2,r3
|
||||
cmp_asl 4,r1,2,r3
|
||||
|
||||
dsp_sub_tests:
|
||||
sub_add r4,r1,r2,r3
|
||||
sub_add r4,r1,2,r3
|
||||
sub_sub r4,r1,r2,r3
|
||||
sub_sub r4,r1,2,r3
|
||||
sub_cmp r4,r1,r2,r3
|
||||
sub_cmp r4,r1,2,r3
|
||||
sub_mov r4,r1,r2,r3
|
||||
sub_mov r4,r1,2,r3
|
||||
sub_asr r4,r1,r2,r3
|
||||
sub_asr r4,r1,2,r3
|
||||
sub_lsr r4,r1,r2,r3
|
||||
sub_lsr r4,r1,2,r3
|
||||
sub_asl r4,r1,r2,r3
|
||||
sub_asl r4,r1,2,r3
|
||||
sub_add 4,r1,r2,r3
|
||||
sub_add 4,r1,2,r3
|
||||
sub_sub 4,r1,r2,r3
|
||||
sub_sub 4,r1,2,r3
|
||||
sub_cmp 4,r1,r2,r3
|
||||
sub_cmp 4,r1,2,r3
|
||||
sub_mov 4,r1,r2,r3
|
||||
sub_mov 4,r1,2,r3
|
||||
sub_asr 4,r1,r2,r3
|
||||
sub_asr 4,r1,2,r3
|
||||
sub_lsr 4,r1,r2,r3
|
||||
sub_lsr 4,r1,2,r3
|
||||
sub_asl 4,r1,r2,r3
|
||||
sub_asl 4,r1,2,r3
|
||||
|
||||
dsp_mov_tests:
|
||||
mov_add r4,r1,r2,r3
|
||||
mov_add r4,r1,2,r3
|
||||
mov_sub r4,r1,r2,r3
|
||||
mov_sub r4,r1,2,r3
|
||||
mov_cmp r4,r1,r2,r3
|
||||
mov_cmp r4,r1,2,r3
|
||||
mov_mov r4,r1,r2,r3
|
||||
mov_mov r4,r1,2,r3
|
||||
mov_asr r4,r1,r2,r3
|
||||
mov_asr r4,r1,2,r3
|
||||
mov_lsr r4,r1,r2,r3
|
||||
mov_lsr r4,r1,2,r3
|
||||
mov_asl r4,r1,r2,r3
|
||||
mov_asl r4,r1,2,r3
|
||||
mov_add 4,r1,r2,r3
|
||||
mov_add 4,r1,2,r3
|
||||
mov_sub 4,r1,r2,r3
|
||||
mov_sub 4,r1,2,r3
|
||||
mov_cmp 4,r1,r2,r3
|
||||
mov_cmp 4,r1,2,r3
|
||||
mov_mov 4,r1,r2,r3
|
||||
mov_mov 4,r1,2,r3
|
||||
mov_asr 4,r1,r2,r3
|
||||
mov_asr 4,r1,2,r3
|
||||
mov_lsr 4,r1,r2,r3
|
||||
mov_lsr 4,r1,2,r3
|
||||
mov_asl 4,r1,r2,r3
|
||||
mov_asl 4,r1,2,r3
|
||||
|
||||
dsp_logical_tests:
|
||||
and_add r4,r1,r2,r3
|
||||
and_add r4,r1,2,r3
|
||||
and_sub r4,r1,r2,r3
|
||||
and_sub r4,r1,2,r3
|
||||
and_cmp r4,r1,r2,r3
|
||||
and_cmp r4,r1,2,r3
|
||||
and_mov r4,r1,r2,r3
|
||||
and_mov r4,r1,2,r3
|
||||
and_asr r4,r1,r2,r3
|
||||
and_asr r4,r1,2,r3
|
||||
and_lsr r4,r1,r2,r3
|
||||
and_lsr r4,r1,2,r3
|
||||
and_asl r4,r1,r2,r3
|
||||
and_asl r4,r1,2,r3
|
||||
xor_add r4,r1,r2,r3
|
||||
xor_add r4,r1,2,r3
|
||||
xor_sub r4,r1,r2,r3
|
||||
xor_sub r4,r1,2,r3
|
||||
xor_cmp r4,r1,r2,r3
|
||||
xor_cmp r4,r1,2,r3
|
||||
xor_mov r4,r1,r2,r3
|
||||
xor_mov r4,r1,2,r3
|
||||
xor_asr r4,r1,r2,r3
|
||||
xor_asr r4,r1,2,r3
|
||||
xor_lsr r4,r1,r2,r3
|
||||
xor_lsr r4,r1,2,r3
|
||||
xor_asl r4,r1,r2,r3
|
||||
xor_asl r4,r1,2,r3
|
||||
or_add r4,r1,r2,r3
|
||||
or_add r4,r1,2,r3
|
||||
or_sub r4,r1,r2,r3
|
||||
or_sub r4,r1,2,r3
|
||||
or_cmp r4,r1,r2,r3
|
||||
or_cmp r4,r1,2,r3
|
||||
or_mov r4,r1,r2,r3
|
||||
or_mov r4,r1,2,r3
|
||||
or_asr r4,r1,r2,r3
|
||||
or_asr r4,r1,2,r3
|
||||
or_lsr r4,r1,r2,r3
|
||||
or_lsr r4,r1,2,r3
|
||||
or_asl r4,r1,r2,r3
|
||||
or_asl r4,r1,2,r3
|
||||
|
||||
dsp_misc_tests:
|
||||
dmach_add r4,r1,r2,r3
|
||||
dmach_add r4,r1,2,r3
|
||||
dmach_sub r4,r1,r2,r3
|
||||
dmach_sub r4,r1,2,r3
|
||||
dmach_cmp r4,r1,r2,r3
|
||||
dmach_cmp r4,r1,2,r3
|
||||
dmach_mov r4,r1,r2,r3
|
||||
dmach_mov r4,r1,2,r3
|
||||
dmach_asr r4,r1,r2,r3
|
||||
dmach_asr r4,r1,2,r3
|
||||
dmach_lsr r4,r1,r2,r3
|
||||
dmach_lsr r4,r1,2,r3
|
||||
dmach_asl r4,r1,r2,r3
|
||||
dmach_asl r4,r1,2,r3
|
||||
swhw_add r4,r1,r2,r3
|
||||
swhw_add r4,r1,2,r3
|
||||
swhw_sub r4,r1,r2,r3
|
||||
swhw_sub r4,r1,2,r3
|
||||
swhw_cmp r4,r1,r2,r3
|
||||
swhw_cmp r4,r1,2,r3
|
||||
swhw_mov r4,r1,r2,r3
|
||||
swhw_mov r4,r1,2,r3
|
||||
swhw_asr r4,r1,r2,r3
|
||||
swhw_asr r4,r1,2,r3
|
||||
swhw_lsr r4,r1,r2,r3
|
||||
swhw_lsr r4,r1,2,r3
|
||||
swhw_asl r4,r1,r2,r3
|
||||
swhw_asl r4,r1,2,r3
|
||||
sat16_add r4,r1,r2,r3
|
||||
sat16_add r4,r1,2,r3
|
||||
sat16_sub r4,r1,r2,r3
|
||||
sat16_sub r4,r1,2,r3
|
||||
sat16_cmp r4,r1,r2,r3
|
||||
sat16_cmp r4,r1,2,r3
|
||||
sat16_mov r4,r1,r2,r3
|
||||
sat16_mov r4,r1,2,r3
|
||||
sat16_asr r4,r1,r2,r3
|
||||
sat16_asr r4,r1,2,r3
|
||||
sat16_lsr r4,r1,r2,r3
|
||||
sat16_lsr r4,r1,2,r3
|
||||
sat16_asl r4,r1,r2,r3
|
||||
sat16_asl r4,r1,2,r3
|
||||
|
||||
autoincrement_tests:
|
||||
mov (r1+),r2
|
||||
mov r3,(r4+)
|
||||
movhu (r6+),r7
|
||||
movhu r8,(r9+)
|
||||
mov (r1+,64),r2
|
||||
mov r1,(r2+,64)
|
||||
movhu (r1+,64),r2
|
||||
movhu r1,(r2+,64)
|
||||
mov (r1+,0x1ffef),r2
|
||||
mov r1,(r2+,0x1ffef)
|
||||
movhu (r1+,0x1ffef),r2
|
||||
movhu r1,(r2+,0x1ffef)
|
||||
mov (r1+,0x7ffefdfc),r2
|
||||
mov r1,(r2+,0x7ffefdfc)
|
||||
movhu (r1+,0x7ffefdfc),r2
|
||||
movhu r1,(r2+,0x7ffefdfc)
|
||||
|
||||
dsp_autoincrement_tests:
|
||||
mov_llt (r1+,4),r2
|
||||
mov_lgt (r1+,4),r2
|
||||
mov_lge (r1+,4),r2
|
||||
mov_lle (r1+,4),r2
|
||||
mov_lcs (r1+,4),r2
|
||||
mov_lhi (r1+,4),r2
|
||||
mov_lcc (r1+,4),r2
|
||||
mov_lls (r1+,4),r2
|
||||
mov_leq (r1+,4),r2
|
||||
mov_lne (r1+,4),r2
|
||||
mov_lra (r1+,4),r2
|
@ -66,7 +66,25 @@ gdb_test "info threads" "" "info threads 1"
|
||||
gdb_breakpoint [gdb_get_line_number "linuxthreads.exp: create philosopher"]
|
||||
for {set i 0} {$i < 5} {incr i} {
|
||||
gdb_continue_to_breakpoint "about to create philosopher: $i"
|
||||
gdb_test "next" "\\\[New Thread .*\\\].*" "create philosopher: $i"
|
||||
send_gdb "next\n"
|
||||
gdb_expect {
|
||||
-re "\\\[New Thread .*\\\].*$gdb_prompt $" {
|
||||
pass "create philosopher: $i"
|
||||
}
|
||||
-re "Program received signal.*(Unknown signal|SIGUSR).*$gdb_prompt $" {
|
||||
# It would be nice if we could catch the message that GDB prints
|
||||
# when it first notices that the thread library doesn't support
|
||||
# debugging, or if we could explicitly ask GDB somehow.
|
||||
unsupported "This GDB does not support threads on this system."
|
||||
return -1
|
||||
}
|
||||
-re "$gdb_prompt $" {
|
||||
fail "create philosopher: $i"
|
||||
}
|
||||
timeout {
|
||||
fail "(timeout) create philosopher: $i"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Run until there are some threads.
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1998, 1999 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -260,7 +260,7 @@ gdb_test "delete tracepoint [expr $trcpt2 + $trcpt3]" \
|
||||
"3.4: delete invalid tracepoint number"
|
||||
|
||||
# 3.5 delete tracepoint number zero
|
||||
gdb_test "delete tracepoint 0" "No tracepoint number 0." \
|
||||
gdb_test "delete tracepoint 0" "bad tracepoint number at or near '0'" \
|
||||
"3.5: delete tracepoint number zero"
|
||||
|
||||
# 3.6 help delete tracepoints
|
||||
|
@ -1189,7 +1189,7 @@ proc gdb_expect { args } {
|
||||
}
|
||||
}
|
||||
|
||||
# gdb_expect_list MESSAGE SENTINAL LIST -- expect a sequence of outputs
|
||||
# gdb_expect_list MESSAGE SENTINEL LIST -- expect a sequence of outputs
|
||||
#
|
||||
# Check for long sequence of output by parts.
|
||||
# MESSAGE: is the test message to be printed with the test success/fail.
|
||||
@ -1202,7 +1202,7 @@ proc gdb_expect { args } {
|
||||
# 0 if the test passes,
|
||||
# -1 if there was an internal error.
|
||||
#
|
||||
proc gdb_expect_list {test sentinal list} {
|
||||
proc gdb_expect_list {test sentinel list} {
|
||||
global gdb_prompt
|
||||
global suppress_flag
|
||||
set index 0
|
||||
@ -1216,16 +1216,20 @@ proc gdb_expect_list {test sentinal list} {
|
||||
if { ${index} == [llength ${list}] } {
|
||||
if { ${ok} } {
|
||||
gdb_expect {
|
||||
-re "${pattern}${sentinal}" {
|
||||
pass "${test}, pattern ${index} + sentinal"
|
||||
-re "${pattern}${sentinel}" {
|
||||
pass "${test}, pattern ${index} + sentinel"
|
||||
}
|
||||
-re "${sentinel}" {
|
||||
fail "${test}, pattern ${index} + sentinel"
|
||||
set ok 0
|
||||
}
|
||||
timeout {
|
||||
fail "${test}, pattern ${index} + sentinal (timeout)"
|
||||
fail "${test}, pattern ${index} + sentinel (timeout)"
|
||||
set ok 0
|
||||
}
|
||||
}
|
||||
} else {
|
||||
fail "${test}, pattern ${index} + sentinal"
|
||||
unresolved "${test}, pattern ${index} + sentinel"
|
||||
}
|
||||
} else {
|
||||
if { ${ok} } {
|
||||
@ -1233,7 +1237,7 @@ proc gdb_expect_list {test sentinal list} {
|
||||
-re "${pattern}" {
|
||||
pass "${test}, pattern ${index}"
|
||||
}
|
||||
-re "${sentinal}" {
|
||||
-re "${sentinel}" {
|
||||
fail "${test}, pattern ${index}"
|
||||
set ok 0
|
||||
}
|
||||
@ -1243,7 +1247,7 @@ proc gdb_expect_list {test sentinal list} {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
fail "${test}, pattern ${index}"
|
||||
unresolved "${test}, pattern ${index}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -288,7 +288,7 @@ char *line;
|
||||
int linesize = 100;
|
||||
|
||||
/* Nonzero if the current command is modified by "server ". This
|
||||
affects things like recording into the command history, comamnds
|
||||
affects things like recording into the command history, commands
|
||||
repeating on RETURN, etc. This is so a user interface (emacs, GUI,
|
||||
whatever) can issue its own commands and also send along commands
|
||||
from the user, and have the user not notice that the user interface
|
||||
@ -472,7 +472,7 @@ PARAMS ((void)) ATTR_NORETURN;
|
||||
/* Return for reason REASON. This generally gets back to the command
|
||||
loop, but can be caught via catch_errors. */
|
||||
|
||||
NORETURN void
|
||||
NORETURN void
|
||||
return_to_top_level (reason)
|
||||
enum return_reason reason;
|
||||
{
|
||||
|
@ -196,13 +196,13 @@ trace_error (buf)
|
||||
|
||||
/* Utility: wait for reply from stub, while accepting "O" packets */
|
||||
static char *
|
||||
remote_get_noisy_reply (buf)
|
||||
char *buf;
|
||||
remote_get_noisy_reply (char *buf,
|
||||
long sizeof_buf)
|
||||
{
|
||||
do /* loop on reply from remote stub */
|
||||
{
|
||||
QUIT; /* allow user to bail out with ^C */
|
||||
getpkt (buf, 0);
|
||||
getpkt (buf, sizeof_buf, 0);
|
||||
if (buf[0] == 0)
|
||||
error ("Target does not support this command.");
|
||||
else if (buf[0] == 'E')
|
||||
@ -599,23 +599,34 @@ tracepoint_operation (t, from_tty, opcode)
|
||||
}
|
||||
|
||||
/* Utility: parse a tracepoint number and look it up in the list.
|
||||
If MULTI_P is true, there might be a range of tracepoints in ARG. */
|
||||
If MULTI_P is true, there might be a range of tracepoints in ARG.
|
||||
if OPTIONAL_P is true, then if the argument is missing, the most
|
||||
recent tracepoint (tracepoint_count) is returned. */
|
||||
struct tracepoint *
|
||||
get_tracepoint_by_number (arg, multi_p)
|
||||
get_tracepoint_by_number (arg, multi_p, optional_p)
|
||||
char **arg;
|
||||
int multi_p;
|
||||
int multi_p, optional_p;
|
||||
{
|
||||
struct tracepoint *t;
|
||||
char *instring = *arg;
|
||||
int tpnum;
|
||||
char *instring = arg == NULL ? NULL : *arg;
|
||||
|
||||
if (arg == NULL)
|
||||
error_no_arg ("tracepoint number");
|
||||
if (arg == NULL || *arg == NULL || ! **arg)
|
||||
{
|
||||
if (optional_p)
|
||||
tpnum = tracepoint_count;
|
||||
else
|
||||
error_no_arg ("tracepoint number");
|
||||
}
|
||||
else
|
||||
tpnum = multi_p ? get_number_or_range (arg) : get_number (arg);
|
||||
|
||||
tpnum = multi_p ? get_number_or_range (arg) : get_number (arg);
|
||||
if (tpnum <= 0)
|
||||
{
|
||||
printf_filtered ("bad tracepoint number at or near '%s'\n", instring);
|
||||
if (instring && *instring)
|
||||
printf_filtered ("bad tracepoint number at or near '%s'\n", instring);
|
||||
else
|
||||
printf_filtered ("Tracepoint argument missing and no previous tracepoint\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -648,7 +659,7 @@ map_args_over_tracepoints (args, from_tty, opcode)
|
||||
while (*args)
|
||||
{
|
||||
QUIT; /* give user option to bail out with ^C */
|
||||
t = get_tracepoint_by_number (&args, 1);
|
||||
t = get_tracepoint_by_number (&args, 1, 0);
|
||||
tracepoint_operation (t, from_tty, opcode);
|
||||
while (*args == ' ' || *args == '\t')
|
||||
args++;
|
||||
@ -707,7 +718,7 @@ trace_pass_command (args, from_tty)
|
||||
int all = 0;
|
||||
|
||||
if (args == 0 || *args == 0)
|
||||
error ("PASS command requires an argument (count + optional TP num)");
|
||||
error ("passcount command requires an argument (count + optional TP num)");
|
||||
|
||||
count = strtoul (args, &args, 10); /* count comes first, then TP num */
|
||||
|
||||
@ -722,7 +733,7 @@ trace_pass_command (args, from_tty)
|
||||
error ("Junk at end of arguments.");
|
||||
}
|
||||
else
|
||||
t1 = get_tracepoint_by_number (&args, 1);
|
||||
t1 = get_tracepoint_by_number (&args, 1, 1);
|
||||
|
||||
do
|
||||
{
|
||||
@ -738,9 +749,9 @@ trace_pass_command (args, from_tty)
|
||||
printf_filtered ("Setting tracepoint %d's passcount to %d\n",
|
||||
t2->number, count);
|
||||
}
|
||||
if (! all && *args)
|
||||
t1 = get_tracepoint_by_number (&args, 1, 0);
|
||||
}
|
||||
if (! all)
|
||||
t1 = get_tracepoint_by_number (&args, 1);
|
||||
}
|
||||
while (*args);
|
||||
}
|
||||
@ -793,7 +804,7 @@ trace_actions_command (args, from_tty)
|
||||
char tmpbuf[128];
|
||||
char *end_msg = "End with a line saying just \"end\".";
|
||||
|
||||
t = get_tracepoint_by_number (&args, 0);
|
||||
t = get_tracepoint_by_number (&args, 0, 1);
|
||||
if (t)
|
||||
{
|
||||
sprintf (tmpbuf, "Enter actions for tracepoint %d, one per line.",
|
||||
@ -1725,7 +1736,7 @@ remote_set_transparent_ranges (void)
|
||||
if (anysecs)
|
||||
{
|
||||
putpkt (target_buf);
|
||||
getpkt (target_buf, 0);
|
||||
getpkt (target_buf, sizeof (target_buf), 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1753,7 +1764,7 @@ trace_start_command (args, from_tty)
|
||||
if (target_is_remote ())
|
||||
{
|
||||
putpkt ("QTinit");
|
||||
remote_get_noisy_reply (target_buf);
|
||||
remote_get_noisy_reply (target_buf, sizeof (target_buf));
|
||||
if (strcmp (target_buf, "OK"))
|
||||
error ("Target does not support this command.");
|
||||
|
||||
@ -1769,7 +1780,7 @@ trace_start_command (args, from_tty)
|
||||
if (t->actions)
|
||||
strcat (buf, "-");
|
||||
putpkt (buf);
|
||||
remote_get_noisy_reply (target_buf);
|
||||
remote_get_noisy_reply (target_buf, sizeof (target_buf));
|
||||
if (strcmp (target_buf, "OK"))
|
||||
error ("Target does not support tracepoints.");
|
||||
|
||||
@ -1793,7 +1804,7 @@ trace_start_command (args, from_tty)
|
||||
((tdp_actions[ndx + 1] || stepping_actions)
|
||||
? '-' : 0));
|
||||
putpkt (buf);
|
||||
remote_get_noisy_reply (target_buf);
|
||||
remote_get_noisy_reply (target_buf, sizeof (target_buf));
|
||||
if (strcmp (target_buf, "OK"))
|
||||
error ("Error on target while setting tracepoints.");
|
||||
}
|
||||
@ -1809,7 +1820,7 @@ trace_start_command (args, from_tty)
|
||||
stepping_actions[ndx],
|
||||
(stepping_actions[ndx + 1] ? "-" : ""));
|
||||
putpkt (buf);
|
||||
remote_get_noisy_reply (target_buf);
|
||||
remote_get_noisy_reply (target_buf, sizeof (target_buf));
|
||||
if (strcmp (target_buf, "OK"))
|
||||
error ("Error on target while setting tracepoints.");
|
||||
}
|
||||
@ -1822,7 +1833,7 @@ trace_start_command (args, from_tty)
|
||||
remote_set_transparent_ranges ();
|
||||
/* Now insert traps and begin collecting data */
|
||||
putpkt ("QTStart");
|
||||
remote_get_noisy_reply (target_buf);
|
||||
remote_get_noisy_reply (target_buf, sizeof (target_buf));
|
||||
if (strcmp (target_buf, "OK"))
|
||||
error ("Bogus reply from target: %s", target_buf);
|
||||
set_traceframe_num (-1); /* all old traceframes invalidated */
|
||||
@ -1846,7 +1857,7 @@ trace_stop_command (args, from_tty)
|
||||
if (target_is_remote ())
|
||||
{
|
||||
putpkt ("QTStop");
|
||||
remote_get_noisy_reply (target_buf);
|
||||
remote_get_noisy_reply (target_buf, sizeof (target_buf));
|
||||
if (strcmp (target_buf, "OK"))
|
||||
error ("Bogus reply from target: %s", target_buf);
|
||||
trace_running_p = 0;
|
||||
@ -1868,7 +1879,7 @@ trace_status_command (args, from_tty)
|
||||
if (target_is_remote ())
|
||||
{
|
||||
putpkt ("qTStatus");
|
||||
remote_get_noisy_reply (target_buf);
|
||||
remote_get_noisy_reply (target_buf, sizeof (target_buf));
|
||||
|
||||
if (target_buf[0] != 'T' ||
|
||||
(target_buf[1] != '0' && target_buf[1] != '1'))
|
||||
@ -1883,9 +1894,9 @@ trace_status_command (args, from_tty)
|
||||
|
||||
/* Worker function for the various flavors of the tfind command */
|
||||
static void
|
||||
finish_tfind_command (msg, from_tty)
|
||||
char *msg;
|
||||
int from_tty;
|
||||
finish_tfind_command (char *msg,
|
||||
long sizeof_msg,
|
||||
int from_tty)
|
||||
{
|
||||
int target_frameno = -1, target_tracept = -1;
|
||||
CORE_ADDR old_frame_addr;
|
||||
@ -1896,7 +1907,7 @@ finish_tfind_command (msg, from_tty)
|
||||
old_func = find_pc_function (read_pc ());
|
||||
|
||||
putpkt (msg);
|
||||
reply = remote_get_noisy_reply (msg);
|
||||
reply = remote_get_noisy_reply (msg, sizeof_msg);
|
||||
|
||||
while (reply && *reply)
|
||||
switch (*reply)
|
||||
@ -2040,7 +2051,7 @@ trace_find_command (args, from_tty)
|
||||
error ("invalid input (%d is less than zero)", frameno);
|
||||
|
||||
sprintf (target_buf, "QTFrame:%x", frameno);
|
||||
finish_tfind_command (target_buf, from_tty);
|
||||
finish_tfind_command (target_buf, sizeof (target_buf), from_tty);
|
||||
}
|
||||
else
|
||||
error ("Trace can only be run on remote targets.");
|
||||
@ -2091,7 +2102,7 @@ trace_find_pc_command (args, from_tty)
|
||||
|
||||
sprintf_vma (tmp, pc);
|
||||
sprintf (target_buf, "QTFrame:pc:%s", tmp);
|
||||
finish_tfind_command (target_buf, from_tty);
|
||||
finish_tfind_command (target_buf, sizeof (target_buf), from_tty);
|
||||
}
|
||||
else
|
||||
error ("Trace can only be run on remote targets.");
|
||||
@ -2116,7 +2127,7 @@ trace_find_tracepoint_command (args, from_tty)
|
||||
tdp = parse_and_eval_address (args);
|
||||
|
||||
sprintf (target_buf, "QTFrame:tdp:%x", tdp);
|
||||
finish_tfind_command (target_buf, from_tty);
|
||||
finish_tfind_command (target_buf, sizeof (target_buf), from_tty);
|
||||
}
|
||||
else
|
||||
error ("Trace can only be run on remote targets.");
|
||||
@ -2212,7 +2223,7 @@ trace_find_line_command (args, from_tty)
|
||||
sprintf (target_buf, "QTFrame:range:%s:%s", startpc_str, endpc_str);
|
||||
else /* find OUTSIDE OF range of CURRENT line */
|
||||
sprintf (target_buf, "QTFrame:outside:%s:%s", startpc_str, endpc_str);
|
||||
finish_tfind_command (target_buf, from_tty);
|
||||
finish_tfind_command (target_buf, sizeof (target_buf), from_tty);
|
||||
do_cleanups (old_chain);
|
||||
}
|
||||
else
|
||||
@ -2254,7 +2265,7 @@ trace_find_range_command (args, from_tty)
|
||||
sprintf_vma (start_str, start);
|
||||
sprintf_vma (stop_str, stop);
|
||||
sprintf (target_buf, "QTFrame:range:%s:%s", start_str, stop_str);
|
||||
finish_tfind_command (target_buf, from_tty);
|
||||
finish_tfind_command (target_buf, sizeof (target_buf), from_tty);
|
||||
}
|
||||
else
|
||||
error ("Trace can only be run on remote targets.");
|
||||
@ -2295,7 +2306,7 @@ trace_find_outside_command (args, from_tty)
|
||||
sprintf_vma (start_str, start);
|
||||
sprintf_vma (stop_str, stop);
|
||||
sprintf (target_buf, "QTFrame:outside:%s:%s", start_str, stop_str);
|
||||
finish_tfind_command (target_buf, from_tty);
|
||||
finish_tfind_command (target_buf, sizeof (target_buf), from_tty);
|
||||
}
|
||||
else
|
||||
error ("Trace can only be run on remote targets.");
|
||||
|
@ -121,7 +121,7 @@ void (*modify_tracepoint_hook) PARAMS ((struct tracepoint *));
|
||||
void (*trace_find_hook) PARAMS ((char *arg, int from_tty));
|
||||
void (*trace_start_stop_hook) PARAMS ((int start, int from_tty));
|
||||
|
||||
struct tracepoint *get_tracepoint_by_number PARAMS ((char **, int));
|
||||
struct tracepoint *get_tracepoint_by_number PARAMS ((char **, int, int));
|
||||
int get_traceframe_number PARAMS ((void));
|
||||
void free_actions PARAMS ((struct tracepoint *));
|
||||
enum actionline_type validate_actionline PARAMS ((char **,
|
||||
|
115
gdb/utils.c
115
gdb/utils.c
@ -98,6 +98,7 @@ static struct cleanup *exec_error_cleanup_chain;
|
||||
support async execution. The finish and until commands use it. So
|
||||
does the target extended-remote command. */
|
||||
struct continuation *cmd_continuation;
|
||||
struct continuation *intermediate_continuation;
|
||||
|
||||
/* Nonzero if we have job control. */
|
||||
|
||||
@ -406,7 +407,7 @@ null_cleanup (arg)
|
||||
}
|
||||
|
||||
/* Add a continuation to the continuation list, the gloabl list
|
||||
cmd_continuation. */
|
||||
cmd_continuation. The new continuation will be added at the front.*/
|
||||
void
|
||||
add_continuation (continuation_hook, arg_list)
|
||||
void (*continuation_hook) PARAMS ((struct continuation_arg *));
|
||||
@ -422,19 +423,34 @@ add_continuation (continuation_hook, arg_list)
|
||||
}
|
||||
|
||||
/* Walk down the cmd_continuation list, and execute all the
|
||||
continuations. */
|
||||
continuations. There is a problem though. In some cases new
|
||||
continuations may be added while we are in the middle of this
|
||||
loop. If this happens they will be added in the front, and done
|
||||
before we have a chance of exhausting those that were already
|
||||
there. We need to then save the beginning of the list in a pointer
|
||||
and do the continuations from there on, instead of using the
|
||||
global beginning of list as our iteration pointer.*/
|
||||
void
|
||||
do_all_continuations ()
|
||||
{
|
||||
struct continuation *continuation_ptr;
|
||||
struct continuation *saved_continuation;
|
||||
|
||||
while (cmd_continuation)
|
||||
{
|
||||
(cmd_continuation->continuation_hook) (cmd_continuation->arg_list);
|
||||
continuation_ptr = cmd_continuation;
|
||||
cmd_continuation = continuation_ptr->next;
|
||||
free (continuation_ptr);
|
||||
}
|
||||
/* Copy the list header into another pointer, and set the global
|
||||
list header to null, so that the global list can change as a side
|
||||
effect of invoking the continuations and the processing of
|
||||
the preexisting continuations will not be affected. */
|
||||
continuation_ptr = cmd_continuation;
|
||||
cmd_continuation = NULL;
|
||||
|
||||
/* Work now on the list we have set aside. */
|
||||
while (continuation_ptr)
|
||||
{
|
||||
(continuation_ptr->continuation_hook) (continuation_ptr->arg_list);
|
||||
saved_continuation = continuation_ptr;
|
||||
continuation_ptr = continuation_ptr->next;
|
||||
free (saved_continuation);
|
||||
}
|
||||
}
|
||||
|
||||
/* Walk down the cmd_continuation list, and get rid of all the
|
||||
@ -452,6 +468,68 @@ discard_all_continuations ()
|
||||
}
|
||||
}
|
||||
|
||||
/* Add a continuation to the continuation list, the gloabl list
|
||||
intermediate_continuation. The new continuation will be added at the front.*/
|
||||
void
|
||||
add_intermediate_continuation (continuation_hook, arg_list)
|
||||
void (*continuation_hook) PARAMS ((struct continuation_arg *));
|
||||
struct continuation_arg *arg_list;
|
||||
{
|
||||
struct continuation *continuation_ptr;
|
||||
|
||||
continuation_ptr = (struct continuation *) xmalloc (sizeof (struct continuation));
|
||||
continuation_ptr->continuation_hook = continuation_hook;
|
||||
continuation_ptr->arg_list = arg_list;
|
||||
continuation_ptr->next = intermediate_continuation;
|
||||
intermediate_continuation = continuation_ptr;
|
||||
}
|
||||
|
||||
/* Walk down the cmd_continuation list, and execute all the
|
||||
continuations. There is a problem though. In some cases new
|
||||
continuations may be added while we are in the middle of this
|
||||
loop. If this happens they will be added in the front, and done
|
||||
before we have a chance of exhausting those that were already
|
||||
there. We need to then save the beginning of the list in a pointer
|
||||
and do the continuations from there on, instead of using the
|
||||
global beginning of list as our iteration pointer.*/
|
||||
void
|
||||
do_all_intermediate_continuations ()
|
||||
{
|
||||
struct continuation *continuation_ptr;
|
||||
struct continuation *saved_continuation;
|
||||
|
||||
/* Copy the list header into another pointer, and set the global
|
||||
list header to null, so that the global list can change as a side
|
||||
effect of invoking the continuations and the processing of
|
||||
the preexisting continuations will not be affected. */
|
||||
continuation_ptr = intermediate_continuation;
|
||||
intermediate_continuation = NULL;
|
||||
|
||||
/* Work now on the list we have set aside. */
|
||||
while (continuation_ptr)
|
||||
{
|
||||
(continuation_ptr->continuation_hook) (continuation_ptr->arg_list);
|
||||
saved_continuation = continuation_ptr;
|
||||
continuation_ptr = continuation_ptr->next;
|
||||
free (saved_continuation);
|
||||
}
|
||||
}
|
||||
|
||||
/* Walk down the cmd_continuation list, and get rid of all the
|
||||
continuations. */
|
||||
void
|
||||
discard_all_intermediate_continuations ()
|
||||
{
|
||||
struct continuation *continuation_ptr;
|
||||
|
||||
while (intermediate_continuation)
|
||||
{
|
||||
continuation_ptr = intermediate_continuation;
|
||||
intermediate_continuation = continuation_ptr->next;
|
||||
free (continuation_ptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Print a warning message. Way to use this is to call warning_begin,
|
||||
@ -525,17 +603,28 @@ error_begin ()
|
||||
NORETURN void
|
||||
verror (const char *string, va_list args)
|
||||
{
|
||||
char *err_string;
|
||||
struct cleanup *err_string_cleanup;
|
||||
/* FIXME: cagney/1999-11-10: All error calls should come here.
|
||||
Unfortunatly some code uses the sequence: error_begin(); print
|
||||
error message; return_to_top_level. That code should be
|
||||
flushed. */
|
||||
error_begin ();
|
||||
vfprintf_filtered (gdb_stderr, string, args);
|
||||
fprintf_filtered (gdb_stderr, "\n");
|
||||
/* Save it as the last error as well (no newline) */
|
||||
/* NOTE: It's tempting to just do the following...
|
||||
vfprintf_filtered (gdb_stderr, string, args);
|
||||
and then follow with a similar looking statement to cause the message
|
||||
to also go to gdb_lasterr. But if we do this, we'll be traversing the
|
||||
va_list twice which works on some platforms and fails miserably on
|
||||
others. */
|
||||
/* Save it as the last error */
|
||||
gdb_file_rewind (gdb_lasterr);
|
||||
vfprintf_filtered (gdb_lasterr, string, args);
|
||||
va_end (args);
|
||||
/* Retrieve the last error and print it to gdb_stderr */
|
||||
err_string = error_last_message ();
|
||||
err_string_cleanup = make_cleanup (free, err_string);
|
||||
fputs_filtered (err_string, gdb_stderr);
|
||||
fprintf_filtered (gdb_stderr, "\n");
|
||||
do_cleanups (err_string_cleanup);
|
||||
return_to_top_level (RETURN_ERROR);
|
||||
}
|
||||
|
||||
|
@ -662,8 +662,8 @@ value_assign (toval, fromval)
|
||||
> len * HOST_CHAR_BIT)
|
||||
/* Getting this right would involve being very careful about
|
||||
byte order. */
|
||||
error ("\
|
||||
Can't handle bitfield which doesn't fit in a single register.");
|
||||
error ("Can't assign to bitfields that cross register "
|
||||
"boundaries.");
|
||||
|
||||
read_register_bytes (VALUE_ADDRESS (toval) + VALUE_OFFSET (toval),
|
||||
buffer, len);
|
||||
|
10
gdb/value.h
10
gdb/value.h
@ -38,7 +38,9 @@ struct value
|
||||
/* Location of value (if lval). */
|
||||
union
|
||||
{
|
||||
/* Address in inferior or byte of registers structure. */
|
||||
/* If lval == lval_memory, this is the address in the inferior.
|
||||
If lval == lval_register, this is the byte offset into the
|
||||
registers structure. */
|
||||
CORE_ADDR address;
|
||||
/* Pointer to internal variable. */
|
||||
struct internalvar *internalvar;
|
||||
@ -48,8 +50,10 @@ struct value
|
||||
}
|
||||
location;
|
||||
/* Describes offset of a value within lval of a structure in bytes.
|
||||
This is used in retrieving contents from target memory. [Note also
|
||||
the member embedded_offset below.] */
|
||||
If lval == lval_memory, this is an offset to the address.
|
||||
If lval == lval_register, this is a further offset from
|
||||
location.address within the registers structure.
|
||||
Note also the member embedded_offset below. */
|
||||
int offset;
|
||||
/* Only used for bitfields; number of bits contained in them. */
|
||||
int bitsize;
|
||||
|
447
gdb/win32-nat.c
447
gdb/win32-nat.c
@ -40,6 +40,7 @@
|
||||
#include "windefs.h"
|
||||
#else /* other WIN32 compiler */
|
||||
#include <windows.h>
|
||||
#include <imagehlp.h>
|
||||
#endif
|
||||
|
||||
#include "buildsym.h"
|
||||
@ -49,6 +50,7 @@
|
||||
#include "gdbthread.h"
|
||||
#include "gdbcmd.h"
|
||||
#include <sys/param.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* The ui's event loop. */
|
||||
extern int (*ui_loop_hook) PARAMS ((int signo));
|
||||
@ -78,9 +80,6 @@ static void child_stop PARAMS ((void));
|
||||
static int win32_child_thread_alive PARAMS ((int));
|
||||
void child_kill_inferior PARAMS ((void));
|
||||
|
||||
static int last_sig = 0; /* Set if a signal was received from the
|
||||
debugged process */
|
||||
|
||||
/* Thread information structure used to track information that is
|
||||
not available in gdb's thread structure. */
|
||||
typedef struct thread_info_struct
|
||||
@ -91,11 +90,13 @@ typedef struct thread_info_struct
|
||||
char *name;
|
||||
int suspend_count;
|
||||
CONTEXT context;
|
||||
}
|
||||
thread_info;
|
||||
STACKFRAME sf;
|
||||
} thread_info;
|
||||
|
||||
static thread_info thread_head =
|
||||
{NULL};
|
||||
static thread_info thread_head = {NULL};
|
||||
|
||||
/* The saved state for a continue after breaking back to gdb. */
|
||||
static DWORD continue_status;
|
||||
|
||||
/* The process and thread handles for the above context. */
|
||||
|
||||
@ -111,7 +112,7 @@ static int event_count = 0;
|
||||
|
||||
/* User options. */
|
||||
static int new_console = 0;
|
||||
static int new_group = 0;
|
||||
static int new_group = 1;
|
||||
static int debug_exec = 0; /* show execution */
|
||||
static int debug_events = 0; /* show events from kernel */
|
||||
static int debug_memory = 0; /* show target memory accesses */
|
||||
@ -157,6 +158,13 @@ static const int mappings[] =
|
||||
context_offset (FloatSave.RegisterArea[5 * 10]),
|
||||
context_offset (FloatSave.RegisterArea[6 * 10]),
|
||||
context_offset (FloatSave.RegisterArea[7 * 10]),
|
||||
context_offset (FloatSave.ControlWord),
|
||||
context_offset (FloatSave.StatusWord),
|
||||
context_offset (FloatSave.TagWord),
|
||||
context_offset (FloatSave.ErrorSelector),
|
||||
context_offset (FloatSave.ErrorOffset),
|
||||
context_offset (FloatSave.DataSelector),
|
||||
context_offset (FloatSave.DataOffset),
|
||||
};
|
||||
|
||||
/* This vector maps the target's idea of an exception (extracted
|
||||
@ -276,7 +284,19 @@ check (BOOL ok, const char *file, int line)
|
||||
static void
|
||||
do_child_fetch_inferior_registers (int r)
|
||||
{
|
||||
if (r >= 0)
|
||||
char *context_offset = ((char *) ¤t_thread->context) + mappings[r];
|
||||
long l;
|
||||
if (r == FCS_REGNUM)
|
||||
{
|
||||
l = *((long *)context_offset) & 0xffff;
|
||||
supply_register (r, (char *) &l);
|
||||
}
|
||||
else if (r == FOP_REGNUM)
|
||||
{
|
||||
l = (*((long *)context_offset) >> 16) & ((1 << 11) - 1);
|
||||
supply_register (r, (char *) &l);
|
||||
}
|
||||
else if (r >= 0)
|
||||
supply_register (r, ((char *) ¤t_thread->context) + mappings[r]);
|
||||
else
|
||||
{
|
||||
@ -312,6 +332,90 @@ child_store_inferior_registers (int r)
|
||||
do_child_store_inferior_registers (r);
|
||||
}
|
||||
|
||||
#include <psapi.h>
|
||||
static int psapi_loaded = 0;
|
||||
static HMODULE psapi_module_handle = NULL;
|
||||
static BOOL WINAPI (*psapi_EnumProcessModules)(HANDLE, HMODULE*, DWORD, LPDWORD)= NULL;
|
||||
static BOOL WINAPI (*psapi_GetModuleInformation) (HANDLE, HMODULE, LPMODULEINFO, DWORD)= NULL;
|
||||
static DWORD WINAPI (*psapi_GetModuleFileNameExA) (HANDLE, HMODULE, LPSTR, DWORD)= NULL;
|
||||
|
||||
int psapi_get_dll_name (DWORD BaseAddress, char *dll_name_ret)
|
||||
{
|
||||
DWORD len;
|
||||
MODULEINFO mi;
|
||||
int i;
|
||||
HMODULE dh_buf [ 1 ];
|
||||
HMODULE* DllHandle = dh_buf;
|
||||
DWORD cbNeeded;
|
||||
BOOL ok;
|
||||
|
||||
if (!psapi_loaded ||
|
||||
psapi_EnumProcessModules == NULL ||
|
||||
psapi_GetModuleInformation == NULL ||
|
||||
psapi_GetModuleFileNameExA == NULL)
|
||||
{
|
||||
if (psapi_loaded)goto failed;
|
||||
psapi_loaded = 1;
|
||||
psapi_module_handle = LoadLibrary ("psapi.dll");
|
||||
if (!psapi_module_handle)
|
||||
{
|
||||
/* printf_unfiltered ("error loading psapi.dll: %u", GetLastError ());*/
|
||||
goto failed;
|
||||
}
|
||||
psapi_EnumProcessModules = GetProcAddress (psapi_module_handle, "EnumProcessModules" );
|
||||
psapi_GetModuleInformation = GetProcAddress (psapi_module_handle, "GetModuleInformation");
|
||||
psapi_GetModuleFileNameExA = (void *) GetProcAddress (psapi_module_handle,
|
||||
"GetModuleFileNameExA");
|
||||
if (psapi_EnumProcessModules == NULL ||
|
||||
psapi_GetModuleInformation == NULL ||
|
||||
psapi_GetModuleFileNameExA == NULL)
|
||||
goto failed;
|
||||
}
|
||||
|
||||
cbNeeded = 0;
|
||||
ok = (*psapi_EnumProcessModules) (current_process_handle,
|
||||
DllHandle,
|
||||
sizeof (HMODULE),
|
||||
&cbNeeded);
|
||||
|
||||
if (!ok || !cbNeeded)
|
||||
goto failed;
|
||||
|
||||
DllHandle = (HMODULE*) alloca (cbNeeded);
|
||||
if (!DllHandle)
|
||||
goto failed;
|
||||
|
||||
ok = (*psapi_EnumProcessModules) (current_process_handle,
|
||||
DllHandle,
|
||||
cbNeeded,
|
||||
&cbNeeded);
|
||||
if (!ok)
|
||||
goto failed;
|
||||
|
||||
for (i = 0; i < cbNeeded / sizeof (HMODULE); i++)
|
||||
{
|
||||
if (!(*psapi_GetModuleInformation) (current_process_handle,
|
||||
DllHandle [i],
|
||||
&mi,
|
||||
sizeof (mi)))
|
||||
error ("Can't get module info");
|
||||
|
||||
len = (*psapi_GetModuleFileNameExA) (current_process_handle,
|
||||
DllHandle [i],
|
||||
dll_name_ret,
|
||||
MAX_PATH);
|
||||
if (len == 0)
|
||||
error ("Error getting dll name: %u\n", GetLastError ());
|
||||
|
||||
if ((DWORD) (mi.lpBaseOfDll) == BaseAddress)
|
||||
return 1;
|
||||
}
|
||||
|
||||
failed:
|
||||
dll_name_ret[0] = '\0';
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Wait for child to do something. Return pid of child, or -1 in case
|
||||
of error; store status through argument pointer OURSTATUS. */
|
||||
|
||||
@ -330,25 +434,10 @@ handle_load_dll (PTR dummy)
|
||||
memset (§ion_addrs, 0, sizeof (section_addrs));
|
||||
dll_buf[0] = dll_buf[sizeof (dll_buf) - 1] = '\0';
|
||||
|
||||
/* The following code attempts to find the name of the dll by reading the
|
||||
name from the processes memory. Unfortunately it doesn't work right.
|
||||
Doing this the "right way" for Windows is very difficult. FIXME */
|
||||
#ifdef DOESNT_WORK
|
||||
memset (&minfo, 0, sizeof minfo);
|
||||
if (VirtualQueryEx (current_process_handle, (LPCVOID) event->lpBaseOfDll,
|
||||
&minfo, sizeof (minfo)) && minfo.BaseAddress)
|
||||
{
|
||||
DWORD len;
|
||||
IMAGE_DOS_HEADER *hmm0 = (IMAGE_DOS_HEADER *) minfo.BaseAddress;
|
||||
HMODULE hmm = (HMODULE) (((DWORD) hmm0) + hmm0->e_lfanew);
|
||||
if (!psapi_get_dll_name ((DWORD) (event->lpBaseOfDll), dll_buf))
|
||||
dll_buf[0] = dll_buf[sizeof(dll_buf) - 1] = '\0';
|
||||
|
||||
if ((len = GetModuleFileName (hmm, dll_buf, MAX_PATH)))
|
||||
{
|
||||
dll_name = dll_buf;
|
||||
dll_name[len] = '\0';
|
||||
}
|
||||
}
|
||||
#endif
|
||||
dll_name = dll_buf;
|
||||
|
||||
/* Attempt to read the name of the dll that was detected.
|
||||
This is documented to work only when actively debugging
|
||||
@ -442,13 +531,13 @@ handle_output_debug_string (struct target_waitstatus *ourstatus)
|
||||
|
||||
if (strncmp (s, CYGWIN_SIGNAL_STRING, sizeof (CYGWIN_SIGNAL_STRING) - 1))
|
||||
{
|
||||
warning (s);
|
||||
if (strncmp (s, "cYg", 3))
|
||||
warning (s);
|
||||
}
|
||||
else
|
||||
{
|
||||
char *p;
|
||||
/*last_sig = */ strtol (s + sizeof (CYGWIN_SIGNAL_STRING) - 1, &p, 0);
|
||||
gotasig = target_signal_from_host (last_sig);
|
||||
int sig = strtol (s + sizeof (CYGWIN_SIGNAL_STRING) - 1, &p, 0);
|
||||
gotasig = target_signal_from_host (sig);
|
||||
ourstatus->value.sig = gotasig;
|
||||
if (gotasig)
|
||||
ourstatus->kind = TARGET_WAITKIND_STOPPED;
|
||||
@ -476,11 +565,13 @@ handle_exception (struct target_waitstatus *ourstatus)
|
||||
DEBUG_EXCEPT (("gdb: Target exception ACCESS_VIOLATION at 0x%08x\n",
|
||||
current_event.u.Exception.ExceptionRecord.ExceptionAddress));
|
||||
ourstatus->value.sig = TARGET_SIGNAL_SEGV;
|
||||
continue_status = DBG_EXCEPTION_NOT_HANDLED;
|
||||
break;
|
||||
case STATUS_STACK_OVERFLOW:
|
||||
DEBUG_EXCEPT (("gdb: Target exception STACK_OVERFLOW at 0x%08x\n",
|
||||
current_event.u.Exception.ExceptionRecord.ExceptionAddress));
|
||||
ourstatus->value.sig = TARGET_SIGNAL_SEGV;
|
||||
continue_status = DBG_EXCEPTION_NOT_HANDLED;
|
||||
break;
|
||||
case EXCEPTION_BREAKPOINT:
|
||||
DEBUG_EXCEPT (("gdb: Target exception BREAKPOINT at 0x%08x\n",
|
||||
@ -491,8 +582,7 @@ handle_exception (struct target_waitstatus *ourstatus)
|
||||
DEBUG_EXCEPT (("gdb: Target exception CONTROL_C at 0x%08x\n",
|
||||
current_event.u.Exception.ExceptionRecord.ExceptionAddress));
|
||||
ourstatus->value.sig = TARGET_SIGNAL_INT;
|
||||
/* User typed CTRL-C. Continue with this status */
|
||||
last_sig = SIGINT; /* FIXME - should check pass state */
|
||||
continue_status = DBG_EXCEPTION_NOT_HANDLED;
|
||||
break;
|
||||
case EXCEPTION_SINGLE_STEP:
|
||||
DEBUG_EXCEPT (("gdb: Target exception SINGLE_STEP at 0x%08x\n",
|
||||
@ -510,6 +600,7 @@ handle_exception (struct target_waitstatus *ourstatus)
|
||||
current_event.u.Exception.ExceptionRecord.ExceptionCode,
|
||||
current_event.u.Exception.ExceptionRecord.ExceptionAddress);
|
||||
ourstatus->value.sig = TARGET_SIGNAL_UNKNOWN;
|
||||
continue_status = DBG_EXCEPTION_NOT_HANDLED;
|
||||
break;
|
||||
}
|
||||
exception_count++;
|
||||
@ -519,7 +610,7 @@ handle_exception (struct target_waitstatus *ourstatus)
|
||||
/* Resume all artificially suspended threads if we are continuing
|
||||
execution */
|
||||
static BOOL
|
||||
child_continue (DWORD continue_status, int id)
|
||||
child_continue (int id)
|
||||
{
|
||||
int i;
|
||||
thread_info *th;
|
||||
@ -530,6 +621,7 @@ child_continue (DWORD continue_status, int id)
|
||||
res = ContinueDebugEvent (current_event.dwProcessId,
|
||||
current_event.dwThreadId,
|
||||
continue_status);
|
||||
continue_status = 0;
|
||||
if (res)
|
||||
for (th = &thread_head; (th = th->next) != NULL;)
|
||||
if (((id == -1) || (id == th->id)) && th->suspend_count)
|
||||
@ -542,9 +634,134 @@ child_continue (DWORD continue_status, int id)
|
||||
return res;
|
||||
}
|
||||
|
||||
static int
|
||||
get_child_debug_event (int pid, struct target_waitstatus *ourstatus,
|
||||
DWORD *event_code, int *retval)
|
||||
{
|
||||
BOOL debug_event;
|
||||
int breakout = 1;
|
||||
|
||||
if (!(debug_event = WaitForDebugEvent (¤t_event, 20)))
|
||||
{
|
||||
breakout = *retval = *event_code = 0;
|
||||
goto out;
|
||||
}
|
||||
|
||||
event_count++;
|
||||
continue_status = DBG_CONTINUE;
|
||||
*retval = 0;
|
||||
|
||||
switch (*event_code = current_event.dwDebugEventCode)
|
||||
{
|
||||
case CREATE_THREAD_DEBUG_EVENT:
|
||||
DEBUG_EVENTS (("gdb: kernel event for pid=%d tid=%x code=%s)\n",
|
||||
(unsigned) current_event.dwProcessId,
|
||||
(unsigned) current_event.dwThreadId,
|
||||
"CREATE_THREAD_DEBUG_EVENT"));
|
||||
/* Record the existence of this thread */
|
||||
child_add_thread (current_event.dwThreadId,
|
||||
current_event.u.CreateThread.hThread);
|
||||
if (info_verbose)
|
||||
printf_unfiltered ("[New %s]\n",
|
||||
target_pid_to_str (current_event.dwThreadId));
|
||||
break;
|
||||
|
||||
case EXIT_THREAD_DEBUG_EVENT:
|
||||
DEBUG_EVENTS (("gdb: kernel event for pid=%d tid=%d code=%s)\n",
|
||||
(unsigned) current_event.dwProcessId,
|
||||
(unsigned) current_event.dwThreadId,
|
||||
"EXIT_THREAD_DEBUG_EVENT"));
|
||||
child_delete_thread (current_event.dwThreadId);
|
||||
break;
|
||||
|
||||
case CREATE_PROCESS_DEBUG_EVENT:
|
||||
DEBUG_EVENTS (("gdb: kernel event for pid=%d tid=%d code=%s)\n",
|
||||
(unsigned) current_event.dwProcessId,
|
||||
(unsigned) current_event.dwThreadId,
|
||||
"CREATE_PROCESS_DEBUG_EVENT"));
|
||||
current_process_handle = current_event.u.CreateProcessInfo.hProcess;
|
||||
|
||||
main_thread_id = inferior_pid = current_event.dwThreadId;
|
||||
/* Add the main thread */
|
||||
current_thread = child_add_thread (inferior_pid,
|
||||
current_event.u.CreateProcessInfo.hThread);
|
||||
break;
|
||||
|
||||
case EXIT_PROCESS_DEBUG_EVENT:
|
||||
DEBUG_EVENTS (("gdb: kernel event for pid=%d tid=%d code=%s)\n",
|
||||
(unsigned) current_event.dwProcessId,
|
||||
(unsigned) current_event.dwThreadId,
|
||||
"EXIT_PROCESS_DEBUG_EVENT"));
|
||||
ourstatus->kind = TARGET_WAITKIND_EXITED;
|
||||
ourstatus->value.integer = current_event.u.ExitProcess.dwExitCode;
|
||||
CloseHandle (current_process_handle);
|
||||
*retval = current_event.dwProcessId;
|
||||
goto out;
|
||||
|
||||
case LOAD_DLL_DEBUG_EVENT:
|
||||
DEBUG_EVENTS (("gdb: kernel event for pid=%d tid=%d code=%s)\n",
|
||||
(unsigned) current_event.dwProcessId,
|
||||
(unsigned) current_event.dwThreadId,
|
||||
"LOAD_DLL_DEBUG_EVENT"));
|
||||
catch_errors (handle_load_dll, NULL, "", RETURN_MASK_ALL);
|
||||
registers_changed (); /* mark all regs invalid */
|
||||
break;
|
||||
|
||||
case UNLOAD_DLL_DEBUG_EVENT:
|
||||
DEBUG_EVENTS (("gdb: kernel event for pid=%d tid=%d code=%s)\n",
|
||||
(unsigned) current_event.dwProcessId,
|
||||
(unsigned) current_event.dwThreadId,
|
||||
"UNLOAD_DLL_DEBUG_EVENT"));
|
||||
break; /* FIXME: don't know what to do here */
|
||||
|
||||
case EXCEPTION_DEBUG_EVENT:
|
||||
DEBUG_EVENTS (("gdb: kernel event for pid=%d tid=%d code=%s)\n",
|
||||
(unsigned) current_event.dwProcessId,
|
||||
(unsigned) current_event.dwThreadId,
|
||||
"EXCEPTION_DEBUG_EVENT"));
|
||||
if (handle_exception (ourstatus)) /* sets continue_status */
|
||||
{
|
||||
*retval = current_event.dwThreadId;
|
||||
goto out;
|
||||
}
|
||||
break;
|
||||
|
||||
case OUTPUT_DEBUG_STRING_EVENT:
|
||||
DEBUG_EVENTS (("gdb: kernel event for pid=%d tid=%d code=%s)\n",
|
||||
(unsigned) current_event.dwProcessId,
|
||||
(unsigned) current_event.dwThreadId,
|
||||
"OUTPUT_DEBUG_STRING_EVENT"));
|
||||
if (handle_output_debug_string (ourstatus))
|
||||
{
|
||||
*retval = main_thread_id;
|
||||
goto out;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
printf_unfiltered ("gdb: kernel event for pid=%d tid=%d\n",
|
||||
current_event.dwProcessId,
|
||||
current_event.dwThreadId);
|
||||
printf_unfiltered (" unknown event code %d\n",
|
||||
current_event.dwDebugEventCode);
|
||||
break;
|
||||
}
|
||||
|
||||
breakout = 0;
|
||||
CHECK (child_continue (-1));
|
||||
continue_status = 0;
|
||||
|
||||
out:
|
||||
return breakout;
|
||||
}
|
||||
|
||||
|
||||
/* Wait for interesting events to occur in the target process. */
|
||||
static int
|
||||
child_wait (int pid, struct target_waitstatus *ourstatus)
|
||||
{
|
||||
DWORD event_code;
|
||||
int retval;
|
||||
|
||||
/* We loop when we get a non-standard exception rather than return
|
||||
with a SPURIOUS because resume can try and step or modify things,
|
||||
which needs a current_thread->h. But some of these exceptions mark
|
||||
@ -553,102 +770,10 @@ child_wait (int pid, struct target_waitstatus *ourstatus)
|
||||
|
||||
while (1)
|
||||
{
|
||||
DWORD continue_status;
|
||||
BOOL debug_event = WaitForDebugEvent (¤t_event, 20);
|
||||
char *p;
|
||||
thread_info *th;
|
||||
int sig;
|
||||
|
||||
if (debug_event)
|
||||
{
|
||||
event_count++;
|
||||
|
||||
continue_status = DBG_CONTINUE;
|
||||
|
||||
switch (current_event.dwDebugEventCode)
|
||||
{
|
||||
case CREATE_THREAD_DEBUG_EVENT:
|
||||
DEBUG_EVENTS (("gdb: kernel event for pid=%d tid=%x code=%s)\n",
|
||||
current_event.dwProcessId, current_event.dwThreadId,
|
||||
"CREATE_THREAD_DEBUG_EVENT"));
|
||||
/* Record the existence of this thread */
|
||||
child_add_thread (current_event.dwThreadId,
|
||||
current_event.u.CreateThread.hThread);
|
||||
if (info_verbose)
|
||||
printf_unfiltered ("[New %s]\n",
|
||||
target_pid_to_str (current_event.dwThreadId));
|
||||
break;
|
||||
|
||||
case EXIT_THREAD_DEBUG_EVENT:
|
||||
DEBUG_EVENTS (("gdb: kernel event for pid=%d tid=%d code=%s)\n",
|
||||
current_event.dwProcessId, current_event.dwThreadId,
|
||||
"EXIT_THREAD_DEBUG_EVENT"));
|
||||
child_delete_thread (current_event.dwThreadId);
|
||||
break;
|
||||
|
||||
case CREATE_PROCESS_DEBUG_EVENT:
|
||||
DEBUG_EVENTS (("gdb: kernel event for pid=%d tid=%d code=%s)\n",
|
||||
current_event.dwProcessId, current_event.dwThreadId,
|
||||
"CREATE_PROCESS_DEBUG_EVENT"));
|
||||
current_process_handle = current_event.u.CreateProcessInfo.hProcess;
|
||||
|
||||
main_thread_id = inferior_pid = current_event.dwThreadId;
|
||||
/* Add the main thread */
|
||||
current_thread = child_add_thread (inferior_pid,
|
||||
current_event.u.CreateProcessInfo.hThread);
|
||||
break;
|
||||
|
||||
case EXIT_PROCESS_DEBUG_EVENT:
|
||||
DEBUG_EVENTS (("gdb: kernel event for pid=%d tid=%d code=%s)\n",
|
||||
current_event.dwProcessId, current_event.dwThreadId,
|
||||
"EXIT_PROCESS_DEBUG_EVENT"));
|
||||
ourstatus->kind = TARGET_WAITKIND_EXITED;
|
||||
ourstatus->value.integer = current_event.u.ExitProcess.dwExitCode;
|
||||
CloseHandle (current_process_handle);
|
||||
return current_event.dwProcessId;
|
||||
break;
|
||||
|
||||
case LOAD_DLL_DEBUG_EVENT:
|
||||
DEBUG_EVENTS (("gdb: kernel event for pid=%d tid=%d code=%s)\n",
|
||||
current_event.dwProcessId, current_event.dwThreadId,
|
||||
"LOAD_DLL_DEBUG_EVENT"));
|
||||
catch_errors (handle_load_dll, NULL, "", RETURN_MASK_ALL);
|
||||
registers_changed (); /* mark all regs invalid */
|
||||
break;
|
||||
|
||||
case UNLOAD_DLL_DEBUG_EVENT:
|
||||
DEBUG_EVENTS (("gdb: kernel event for pid=%d tid=%d code=%s)\n",
|
||||
current_event.dwProcessId, current_event.dwThreadId,
|
||||
"UNLOAD_DLL_DEBUG_EVENT"));
|
||||
break; /* FIXME: don't know what to do here */
|
||||
|
||||
case EXCEPTION_DEBUG_EVENT:
|
||||
DEBUG_EVENTS (("gdb: kernel event for pid=%d tid=%d code=%s)\n",
|
||||
current_event.dwProcessId, current_event.dwThreadId,
|
||||
"EXCEPTION_DEBUG_EVENT"));
|
||||
if (handle_exception (ourstatus))
|
||||
return current_event.dwThreadId;
|
||||
continue_status = DBG_EXCEPTION_NOT_HANDLED;
|
||||
break;
|
||||
|
||||
case OUTPUT_DEBUG_STRING_EVENT: /* message from the kernel */
|
||||
DEBUG_EVENTS (("gdb: kernel event for pid=%d tid=%d code=%s)\n",
|
||||
current_event.dwProcessId, current_event.dwThreadId,
|
||||
"OUTPUT_DEBUG_STRING_EVENT"));
|
||||
if (handle_output_debug_string (ourstatus))
|
||||
return main_thread_id;
|
||||
break;
|
||||
default:
|
||||
printf_unfiltered ("gdb: kernel event for pid=%d tid=%d\n",
|
||||
current_event.dwProcessId,
|
||||
current_event.dwThreadId);
|
||||
printf_unfiltered (" unknown event code %d\n",
|
||||
current_event.dwDebugEventCode);
|
||||
break;
|
||||
}
|
||||
|
||||
CHECK (child_continue (continue_status, -1));
|
||||
}
|
||||
if (continue_status != 0)
|
||||
CHECK (child_continue (-1));
|
||||
if (get_child_debug_event (pid, ourstatus, &event_code, &retval))
|
||||
return retval;
|
||||
else
|
||||
{
|
||||
int detach = 0;
|
||||
@ -754,13 +879,13 @@ child_create_inferior (exec_file, allargs, env)
|
||||
char *temp;
|
||||
int envlen;
|
||||
int i;
|
||||
|
||||
STARTUPINFO si;
|
||||
PROCESS_INFORMATION pi;
|
||||
struct target_waitstatus dummy;
|
||||
BOOL ret;
|
||||
DWORD flags;
|
||||
char *args;
|
||||
DWORD event_code;
|
||||
|
||||
if (!exec_file)
|
||||
{
|
||||
@ -887,16 +1012,19 @@ child_create_inferior (exec_file, allargs, env)
|
||||
target_terminal_init ();
|
||||
target_terminal_inferior ();
|
||||
|
||||
/* Ignore the first trap */
|
||||
child_wait (inferior_pid, &dummy);
|
||||
/* Run until process and threads are loaded */
|
||||
do
|
||||
get_child_debug_event (inferior_pid, &dummy, &event_code, &ret);
|
||||
while (event_code != EXCEPTION_DEBUG_EVENT);
|
||||
|
||||
proceed ((CORE_ADDR) -1, TARGET_SIGNAL_0, 0);
|
||||
proceed ((CORE_ADDR) - 1, TARGET_SIGNAL_0, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
child_mourn_inferior ()
|
||||
{
|
||||
(void) child_continue (DBG_CONTINUE, -1);
|
||||
continue_status = DBG_CONTINUE;
|
||||
(void) child_continue (-1);
|
||||
unpush_target (&child_ops);
|
||||
generic_mourn_inferior ();
|
||||
}
|
||||
@ -908,7 +1036,7 @@ static void
|
||||
child_stop ()
|
||||
{
|
||||
DEBUG_EVENTS (("gdb: GenerateConsoleCtrlEvent (CTRLC_EVENT, 0)\n"));
|
||||
CHECK (GenerateConsoleCtrlEvent (CTRL_C_EVENT, 0));
|
||||
CHECK (GenerateConsoleCtrlEvent (CTRL_C_EVENT, current_event.dwProcessId));
|
||||
registers_changed (); /* refresh register state */
|
||||
}
|
||||
|
||||
@ -942,7 +1070,8 @@ child_kill_inferior (void)
|
||||
|
||||
for (;;)
|
||||
{
|
||||
if (!child_continue (DBG_CONTINUE, -1))
|
||||
continue_status = DBG_CONTINUE;
|
||||
if (!child_continue (-1))
|
||||
break;
|
||||
if (!WaitForDebugEvent (¤t_event, INFINITE))
|
||||
break;
|
||||
@ -962,8 +1091,6 @@ child_resume (int pid, int step, enum target_signal sig)
|
||||
{
|
||||
int i;
|
||||
thread_info *th;
|
||||
DWORD continue_status = last_sig > 0 && last_sig < NSIG ?
|
||||
DBG_EXCEPTION_NOT_HANDLED : DBG_CONTINUE;
|
||||
|
||||
DEBUG_EXEC (("gdb: child_resume (pid=%d, step=%d, sig=%d);\n",
|
||||
pid, step, sig));
|
||||
@ -987,11 +1114,8 @@ child_resume (int pid, int step, enum target_signal sig)
|
||||
|
||||
/* Allow continuing with the same signal that interrupted us.
|
||||
Otherwise complain. */
|
||||
if (sig && sig != last_sig)
|
||||
fprintf_unfiltered (gdb_stderr, "Can't send signals to the child. signal %d\n", sig);
|
||||
|
||||
last_sig = 0;
|
||||
child_continue (continue_status, pid);
|
||||
child_continue (pid);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1131,3 +1255,40 @@ cygwin_pid_to_str (int pid)
|
||||
sprintf (buf, "thread %d.0x%x", current_event.dwProcessId, pid);
|
||||
return buf;
|
||||
}
|
||||
#ifdef NOTYET
|
||||
CORE_ADDR
|
||||
win32_read_fp ()
|
||||
{
|
||||
STACKFRAME *sf = current_thread->sf;
|
||||
|
||||
memset (&sf, 0, sizeof(sf));
|
||||
sf->AddrPC.Offset = current_thread->context.Eip;
|
||||
sf->AddrPC.Mode = AddrModeFlat;
|
||||
sf->AddrStack.Offset = current_thread->context.Esp;
|
||||
sf->AddrStack.Mode = AddrModeFlat;
|
||||
sf->AddrFrame.Offset = current_thread->context.Ebp;
|
||||
if (!StackWalk (IMAGE_FILE_MACHINE_I386, current_process_handle,
|
||||
current->thread->h, sf, NULL, NULL,
|
||||
SymFunctionTableAccess, SymGetModuleBase, NULL))
|
||||
return NULL;
|
||||
return (CORE_ADDR) sf.AddrFrame.Offset;
|
||||
}
|
||||
|
||||
CORE_ADDR
|
||||
child_frame_chain(struct frame_info *thisframe)
|
||||
{
|
||||
STACKFRAME *sf = current->thread->sf;
|
||||
#if 0
|
||||
sf.AddrPC.Offset = thisframe->pc;
|
||||
sf.AddrPC.Mode = AddrModeFlat;
|
||||
sf.AddrStack.Offset = thisframe->;
|
||||
sf.AddrStack.Mode = AddrModeFlat;
|
||||
sf.AddrFrame.Offset = cx->Ebp;
|
||||
#endif
|
||||
if (!StackWalk (IMAGE_FILE_MACHINE_I386, current_process_handle,
|
||||
current->thread->h, &sf, NULL, NULL,
|
||||
SymFunctionTableAccess, SymGetModuleBase, NULL))
|
||||
return NULL;
|
||||
return (CORE_ADDR) sf->AddrFrame.Offset;
|
||||
}
|
||||
#endif
|
||||
|
@ -753,7 +753,7 @@ process_linenos (start, end)
|
||||
start_subfile (fakename, (char *) 0);
|
||||
free (current_subfile->name);
|
||||
}
|
||||
current_subfile->name = strdup (inclTable[ii].name);
|
||||
current_subfile->name = xstrdup (inclTable[ii].name);
|
||||
#endif
|
||||
|
||||
if (lv == lineTb)
|
||||
|
@ -1,3 +1,9 @@
|
||||
1999-11-18 Ben Elliston <bje@cygnus.com>
|
||||
|
||||
* configure.in: Require autoconf 2.13 and remove obsolete
|
||||
invocation of AC_C_CROSS.
|
||||
* configure: Regenerate.
|
||||
|
||||
1999-09-29 Doug Evans <devans@casey.cygnus.com>
|
||||
|
||||
* configure.in: Configure the testsuite directory for thumb.
|
||||
|
@ -1,3 +1,10 @@
|
||||
1999-11-22 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* armos.c (SWIread): Generate an error message if a huge read is
|
||||
performed.
|
||||
(SWIwrite): Generate an error message if a huge write is
|
||||
performed.
|
||||
|
||||
1999-10-27 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* thumbemu.c (ARMul_ThumbDecode): Accept 0xbebe as a thumb
|
||||
|
@ -878,7 +878,6 @@ mainswitch:
|
||||
break ;
|
||||
|
||||
case 0x10 : /* TST reg and MRS CPSR and SWP word */
|
||||
|
||||
#ifdef MODET
|
||||
if (BITS(4,11) == 0xB) {
|
||||
/* STRH register offset, no write-back, down, pre indexed */
|
||||
@ -2410,13 +2409,13 @@ mainswitch:
|
||||
* Co-Processor Data Transfers *
|
||||
\***************************************************************************/
|
||||
|
||||
case 0xc0 :
|
||||
case 0xc4 : /* Store , No WriteBack , Post Dec */
|
||||
case 0xc4 :
|
||||
case 0xc0 : /* Store , No WriteBack , Post Dec */
|
||||
ARMul_STC(state,instr,LHS) ;
|
||||
break ;
|
||||
|
||||
case 0xc1 :
|
||||
case 0xc5 : /* Load , No WriteBack , Post Dec */
|
||||
case 0xc5 :
|
||||
case 0xc1 : /* Load , No WriteBack , Post Dec */
|
||||
ARMul_LDC(state,instr,LHS) ;
|
||||
break ;
|
||||
|
||||
@ -2511,7 +2510,8 @@ mainswitch:
|
||||
* Co-Processor Register Transfers (MCR) and Data Ops *
|
||||
\***************************************************************************/
|
||||
|
||||
case 0xe0 : case 0xe2 : case 0xe4 : case 0xe6 :
|
||||
case 0xe2 :
|
||||
case 0xe0 : case 0xe4 : case 0xe6 :
|
||||
case 0xe8 : case 0xea : case 0xec : case 0xee :
|
||||
if (BIT(4)) { /* MCR */
|
||||
if (DESTReg == 15) {
|
||||
|
@ -308,6 +308,12 @@ SWIread (ARMul_State *state, ARMword f, ARMword ptr, ARMword len)
|
||||
int i;
|
||||
char *local = malloc (len);
|
||||
|
||||
if (local == NULL)
|
||||
{
|
||||
fprintf (stderr, "sim: Unable to read 0x%x bytes - out of memory\n", len);
|
||||
return;
|
||||
}
|
||||
|
||||
res = read (f, local, len);
|
||||
if (res > 0)
|
||||
for (i = 0; i < res; i++)
|
||||
@ -325,10 +331,15 @@ SWIwrite (ARMul_State *state, ARMword f, ARMword ptr, ARMword len)
|
||||
int i;
|
||||
char *local = malloc (len);
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
if (local == NULL)
|
||||
{
|
||||
local[i] = ARMul_ReadByte (state, ptr + i);
|
||||
fprintf (stderr, "sim: Unable to write 0x%x bytes - out of memory\n", len);
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
local[i] = ARMul_ReadByte (state, ptr + i);
|
||||
|
||||
res = write (f, local, len);
|
||||
state->Reg[0] = res == -1 ? -1 : len - res;
|
||||
free (local);
|
||||
|
@ -1,3 +1,34 @@
|
||||
1999-12-01 Dave Brolley <brolley@cygnus.com>
|
||||
|
||||
* cgen-accfp.c (subsf): Check status code.
|
||||
(mulsf): Ditto.
|
||||
(negsf): Ditto.
|
||||
(abssf): Ditto.
|
||||
(sqrtsf): Ditto.
|
||||
(invsf): Ditto.
|
||||
(minsf): Ditto.
|
||||
(maxsf): Ditto.
|
||||
(subdf): Ditto.
|
||||
(muldf): Ditto.
|
||||
(divdf): Ditto.
|
||||
(negdf): Ditto.
|
||||
(absdf): Ditto.
|
||||
(sqrtdf): Ditto.
|
||||
(invdf): Ditto.
|
||||
(mindf): Ditto.
|
||||
(maxdf): Ditto.
|
||||
|
||||
1999-11-26 Dave Brolley <brolley@cygnus.com>
|
||||
|
||||
* cgen-par.h (fn_df_write): Mode of data is DF.
|
||||
(sim_queue_fn_df_write): Mode of data is DF.
|
||||
* cgen-par.c (sim_queue_fn_df_write): Mode of data is DF.
|
||||
|
||||
1999-11-22 Dave Brolley <brolley@cygnus.com>
|
||||
|
||||
* cgen-trace.c (SIZE_TRACE_BUF): Inxrease size of trace buffer.
|
||||
* cgen-par.h (CGEN_WRITE_QUEUE_SIZE): Increase size of queue.
|
||||
|
||||
1999-11-04 Dave Brolley <brolley@cygnus.com>
|
||||
|
||||
* cgen-par.h (cgen_write_queue_kind): Add CGEN_FN_XI_WRITE and
|
||||
|
@ -42,10 +42,13 @@ subsf (CGEN_FPU* fpu, SF x, SF y)
|
||||
sim_fpu op2;
|
||||
sim_fpu ans;
|
||||
unsigned32 res;
|
||||
sim_fpu_status status;
|
||||
|
||||
sim_fpu_32to (&op1, x);
|
||||
sim_fpu_32to (&op2, y);
|
||||
sim_fpu_sub (&ans, &op1, &op2);
|
||||
status = sim_fpu_sub (&ans, &op1, &op2);
|
||||
if (status != 0)
|
||||
(*fpu->ops->error) (fpu, status);
|
||||
sim_fpu_to32 (&res, &ans);
|
||||
|
||||
return res;
|
||||
@ -58,10 +61,13 @@ mulsf (CGEN_FPU* fpu, SF x, SF y)
|
||||
sim_fpu op2;
|
||||
sim_fpu ans;
|
||||
unsigned32 res;
|
||||
sim_fpu_status status;
|
||||
|
||||
sim_fpu_32to (&op1, x);
|
||||
sim_fpu_32to (&op2, y);
|
||||
sim_fpu_mul (&ans, &op1, &op2);
|
||||
status = sim_fpu_mul (&ans, &op1, &op2);
|
||||
if (status != 0)
|
||||
(*fpu->ops->error) (fpu, status);
|
||||
sim_fpu_to32 (&res, &ans);
|
||||
|
||||
return res;
|
||||
@ -92,9 +98,12 @@ negsf (CGEN_FPU* fpu, SF x)
|
||||
sim_fpu op1;
|
||||
sim_fpu ans;
|
||||
unsigned32 res;
|
||||
sim_fpu_status status;
|
||||
|
||||
sim_fpu_32to (&op1, x);
|
||||
sim_fpu_neg (&ans, &op1);
|
||||
status = sim_fpu_neg (&ans, &op1);
|
||||
if (status != 0)
|
||||
(*fpu->ops->error) (fpu, status);
|
||||
sim_fpu_to32 (&res, &ans);
|
||||
|
||||
return res;
|
||||
@ -106,9 +115,12 @@ abssf (CGEN_FPU* fpu, SF x)
|
||||
sim_fpu op1;
|
||||
sim_fpu ans;
|
||||
unsigned32 res;
|
||||
sim_fpu_status status;
|
||||
|
||||
sim_fpu_32to (&op1, x);
|
||||
sim_fpu_abs (&ans, &op1);
|
||||
status = sim_fpu_abs (&ans, &op1);
|
||||
if (status != 0)
|
||||
(*fpu->ops->error) (fpu, status);
|
||||
sim_fpu_to32 (&res, &ans);
|
||||
|
||||
return res;
|
||||
@ -120,9 +132,12 @@ sqrtsf (CGEN_FPU* fpu, SF x)
|
||||
sim_fpu op1;
|
||||
sim_fpu ans;
|
||||
unsigned32 res;
|
||||
sim_fpu_status status;
|
||||
|
||||
sim_fpu_32to (&op1, x);
|
||||
sim_fpu_sqrt (&ans, &op1);
|
||||
status = sim_fpu_sqrt (&ans, &op1);
|
||||
if (status != 0)
|
||||
(*fpu->ops->error) (fpu, status);
|
||||
sim_fpu_to32 (&res, &ans);
|
||||
|
||||
return res;
|
||||
@ -134,9 +149,12 @@ invsf (CGEN_FPU* fpu, SF x)
|
||||
sim_fpu op1;
|
||||
sim_fpu ans;
|
||||
unsigned32 res;
|
||||
sim_fpu_status status;
|
||||
|
||||
sim_fpu_32to (&op1, x);
|
||||
sim_fpu_inv (&ans, &op1);
|
||||
status = sim_fpu_inv (&ans, &op1);
|
||||
if (status != 0)
|
||||
(*fpu->ops->error) (fpu, status);
|
||||
sim_fpu_to32 (&res, &ans);
|
||||
|
||||
return res;
|
||||
@ -149,10 +167,13 @@ minsf (CGEN_FPU* fpu, SF x, SF y)
|
||||
sim_fpu op2;
|
||||
sim_fpu ans;
|
||||
unsigned32 res;
|
||||
sim_fpu_status status;
|
||||
|
||||
sim_fpu_32to (&op1, x);
|
||||
sim_fpu_32to (&op2, y);
|
||||
sim_fpu_min (&ans, &op1, &op2);
|
||||
status = sim_fpu_min (&ans, &op1, &op2);
|
||||
if (status != 0)
|
||||
(*fpu->ops->error) (fpu, status);
|
||||
sim_fpu_to32 (&res, &ans);
|
||||
|
||||
return res;
|
||||
@ -165,10 +186,13 @@ maxsf (CGEN_FPU* fpu, SF x, SF y)
|
||||
sim_fpu op2;
|
||||
sim_fpu ans;
|
||||
unsigned32 res;
|
||||
sim_fpu_status status;
|
||||
|
||||
sim_fpu_32to (&op1, x);
|
||||
sim_fpu_32to (&op2, y);
|
||||
sim_fpu_max (&ans, &op1, &op2);
|
||||
status = sim_fpu_max (&ans, &op1, &op2);
|
||||
if (status != 0)
|
||||
(*fpu->ops->error) (fpu, status);
|
||||
sim_fpu_to32 (&res, &ans);
|
||||
|
||||
return res;
|
||||
@ -354,10 +378,13 @@ subdf (CGEN_FPU* fpu, DF x, DF y)
|
||||
sim_fpu op2;
|
||||
sim_fpu ans;
|
||||
unsigned64 res;
|
||||
sim_fpu_status status;
|
||||
|
||||
sim_fpu_64to (&op1, x);
|
||||
sim_fpu_64to (&op2, y);
|
||||
sim_fpu_sub (&ans, &op1, &op2);
|
||||
status = sim_fpu_sub (&ans, &op1, &op2);
|
||||
if (status != 0)
|
||||
(*fpu->ops->error) (fpu, status);
|
||||
sim_fpu_to64 (&res, &ans);
|
||||
|
||||
return res;
|
||||
@ -370,10 +397,13 @@ muldf (CGEN_FPU* fpu, DF x, DF y)
|
||||
sim_fpu op2;
|
||||
sim_fpu ans;
|
||||
unsigned64 res;
|
||||
sim_fpu_status status;
|
||||
|
||||
sim_fpu_64to (&op1, x);
|
||||
sim_fpu_64to (&op2, y);
|
||||
sim_fpu_mul (&ans, &op1, &op2);
|
||||
status = sim_fpu_mul (&ans, &op1, &op2);
|
||||
if (status != 0)
|
||||
(*fpu->ops->error) (fpu, status);
|
||||
sim_fpu_to64 (&res, &ans);
|
||||
|
||||
return res;
|
||||
@ -386,10 +416,13 @@ divdf (CGEN_FPU* fpu, DF x, DF y)
|
||||
sim_fpu op2;
|
||||
sim_fpu ans;
|
||||
unsigned64 res;
|
||||
sim_fpu_status status;
|
||||
|
||||
sim_fpu_64to (&op1, x);
|
||||
sim_fpu_64to (&op2, y);
|
||||
sim_fpu_div (&ans, &op1, &op2);
|
||||
status = sim_fpu_div (&ans, &op1, &op2);
|
||||
if (status != 0)
|
||||
(*fpu->ops->error) (fpu, status);
|
||||
sim_fpu_to64 (&res, &ans);
|
||||
|
||||
return res;
|
||||
@ -401,9 +434,12 @@ negdf (CGEN_FPU* fpu, DF x)
|
||||
sim_fpu op1;
|
||||
sim_fpu ans;
|
||||
unsigned64 res;
|
||||
sim_fpu_status status;
|
||||
|
||||
sim_fpu_64to (&op1, x);
|
||||
sim_fpu_neg (&ans, &op1);
|
||||
status = sim_fpu_neg (&ans, &op1);
|
||||
if (status != 0)
|
||||
(*fpu->ops->error) (fpu, status);
|
||||
sim_fpu_to64 (&res, &ans);
|
||||
|
||||
return res;
|
||||
@ -415,9 +451,12 @@ absdf (CGEN_FPU* fpu, DF x)
|
||||
sim_fpu op1;
|
||||
sim_fpu ans;
|
||||
unsigned64 res;
|
||||
sim_fpu_status status;
|
||||
|
||||
sim_fpu_64to (&op1, x);
|
||||
sim_fpu_abs (&ans, &op1);
|
||||
status = sim_fpu_abs (&ans, &op1);
|
||||
if (status != 0)
|
||||
(*fpu->ops->error) (fpu, status);
|
||||
sim_fpu_to64 (&res, &ans);
|
||||
|
||||
return res;
|
||||
@ -429,9 +468,12 @@ sqrtdf (CGEN_FPU* fpu, DF x)
|
||||
sim_fpu op1;
|
||||
sim_fpu ans;
|
||||
unsigned64 res;
|
||||
sim_fpu_status status;
|
||||
|
||||
sim_fpu_64to (&op1, x);
|
||||
sim_fpu_sqrt (&ans, &op1);
|
||||
status = sim_fpu_sqrt (&ans, &op1);
|
||||
if (status != 0)
|
||||
(*fpu->ops->error) (fpu, status);
|
||||
sim_fpu_to64 (&res, &ans);
|
||||
|
||||
return res;
|
||||
@ -443,9 +485,12 @@ invdf (CGEN_FPU* fpu, DF x)
|
||||
sim_fpu op1;
|
||||
sim_fpu ans;
|
||||
unsigned64 res;
|
||||
sim_fpu_status status;
|
||||
|
||||
sim_fpu_64to (&op1, x);
|
||||
sim_fpu_inv (&ans, &op1);
|
||||
status = sim_fpu_inv (&ans, &op1);
|
||||
if (status != 0)
|
||||
(*fpu->ops->error) (fpu, status);
|
||||
sim_fpu_to64 (&res, &ans);
|
||||
|
||||
return res;
|
||||
@ -458,10 +503,13 @@ mindf (CGEN_FPU* fpu, DF x, DF y)
|
||||
sim_fpu op2;
|
||||
sim_fpu ans;
|
||||
unsigned64 res;
|
||||
sim_fpu_status status;
|
||||
|
||||
sim_fpu_64to (&op1, x);
|
||||
sim_fpu_64to (&op2, y);
|
||||
sim_fpu_min (&ans, &op1, &op2);
|
||||
status = sim_fpu_min (&ans, &op1, &op2);
|
||||
if (status != 0)
|
||||
(*fpu->ops->error) (fpu, status);
|
||||
sim_fpu_to64 (&res, &ans);
|
||||
|
||||
return res;
|
||||
@ -474,10 +522,13 @@ maxdf (CGEN_FPU* fpu, DF x, DF y)
|
||||
sim_fpu op2;
|
||||
sim_fpu ans;
|
||||
unsigned64 res;
|
||||
sim_fpu_status status;
|
||||
|
||||
sim_fpu_64to (&op1, x);
|
||||
sim_fpu_64to (&op2, y);
|
||||
sim_fpu_max (&ans, &op1, &op2);
|
||||
status = sim_fpu_max (&ans, &op1, &op2);
|
||||
if (status != 0)
|
||||
(*fpu->ops->error) (fpu, status);
|
||||
sim_fpu_to64 (&res, &ans);
|
||||
|
||||
return res;
|
||||
|
@ -142,7 +142,7 @@ void sim_queue_fn_xi_write (
|
||||
|
||||
void sim_queue_fn_df_write (
|
||||
SIM_CPU *cpu,
|
||||
void (*write_function)(SIM_CPU *cpu, UINT, DI),
|
||||
void (*write_function)(SIM_CPU *cpu, UINT, DF),
|
||||
UINT regno,
|
||||
DF value
|
||||
)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user