aboutsummaryrefslogtreecommitdiff
path: root/gdb/dcache.c
AgeCommit message (Collapse)AuthorFilesLines
1998-10-161998-10-16 Jason Molenda (jsm@bugshack.cygnus.com)Jason Molenda1-8/+9
* command.c copying.c copying.awk core-aout.c core-regset.c corelow.c dcache.c i386-tdep.c i386v4-nat.c i387-tdep.c infcmd.c infptrace.c infrun.c remote.c solib.c symfile.c symmisc.c valarith.c: Add prototypes. * defs.h: Add prototype for utils.c::do_run_cleanups. * gdbtypes.c: Add prototypes. (make_pointer_type): Add braces to remove nested if-else ambiguity. (make_reference_type): Ditto. * printcmd.c (printf_command): Initialize 'f' and 'string' at function startup to suppress possibly-used-before-initialized warning. * remote-utils.c: Add prototypes. (sr_pollchar): Add braces to remove nested if-else ambiguity. * ser-tcp.c: Add prototypes. (wait_for): Add braces to remove nested if-else ambiguity. (tcp_readchar): Ditto. * ser-unix.c: Add prototypes. (get_tty_state): Don't define errno here. (get_tty_state): Don't define errno here. (hardwire_readchar): Only define 't' if we are compiling in a Cygwin environment. * symtab.c: Add prototypes. (find_methods): Add braces to remove nested if-else ambiguity. (search_symbols): Set 'i' to an initial value to suppress a possibly-used-before-initialized warning. * valops.c: Add prototypes. (value_cast): Set 'eltype2' to an initial value to suppress a possibly-used-before-initialized warning. (value_of_variable): Add braces to remove nested if-else ambiguity. (value_of_this): Ditto. * valprint.c: Add prototypes. (print_floating): Add braces to remove nested if-else ambiguity. Looks like a big change, but it is really just a lot of small stuff. In the cases where GCC was flagging a possible use-before-initialized warning on variables, it turned out that these were being used properly but GCC couldn't see that.
1996-07-26See gdb ChangeLog entry with header:Fred Fish1-5/+5
Thu Jul 25 19:41:31 1996 Fred Fish <fnf@cygnus.com> for a rather huge set of changes. I was going to put them here, but it made cvs dump core. :-(
1996-05-26 Changes from: David Mosberger-Tang <davidm@azstarnet.com>Fred Fish1-4/+4
* NEWS: Add Alpha Linux as a new native configuration. * mdebugread.c (parse_symbol): When we find a malloc() symbol with return type VOID, assume no debugging info is available for that object file and patch the return value into VOID *. Otherwise, operations requiring an implicit call to malloc() will fail. * infrun.c (wait_for_inferior): The criterion to detect entering a sigtramp handler is now: (a) the current pc is inside a sigtramp handler, (b) the previous pc is not in a sigtramp handler, and (c) the current stack pointer is "inner" than the old one. Condition (c) is new to avoid mistaking a return from a signal handler into sigtramp as a new sigtramp invocation. * dcache.c (struct dcache_block): Declare addr as CORE_ADDR. An int may not be big enough to hold an address. (dcache_hit): Ditto. (dcache_peek_byte): Fix indentation. * configure.in (alpha-*-linux*): Add target. * configure: Rebuild * config/alpha/tm-alpha.h (PROC_DESC_IS_DYN_SIGTRAMP): New macro. (SET_PROC_DESC_IS_DYN_SIGTRAMP): Ditto. (DYNAMIC_SIGTRAMP_OFFSET): Ditto. (SIGCONTEXT_ADDR): Ditto. (FRAME_PAST_SIGTRAMP_FRAME): Ditto. * config/alpha/alpha-linux.mh: New file. * config/alpha/alpha-linux.mt: Ditto. * config/alpha/nm-linux.h: Ditto. * config/alpha/tm-alphalinux.h: Ditto. * config/alpha/xm-alphalinux.h: Ditto. * config/alpha/xm-alphaosf.h: Renamed from xm-alpha.h. * config/alpha/alpha-osf1.mh (XM_FILE): Change from xm-alpha.h to xm-alphaosf.h. * config/alpha/alpha-osf2.mh: Ditto. * blockframe.c (find_pc_partial_function): Pass PC to SIGTRAMP_START and SIGTRAMP_END macros for the benefit of systems that detect sigtramp code via designated code sequences (as is the case for Linux/Alpha, for example). * config/i386/tm-i386bsd.h: Change SIGTRAMP_START and SIGTRAMP_END to ignore new PC argument. * config/m68k/tm-hp300bsd.h: Ditto. * config/vax/tm-vax.h: Ditto. * alpha-tdep.c (alpha_linux_sigtramp_offset): New function. (alpha_osf_skip_sigtramp_frame): Ditto. (push_sigtramp_desc): Ditto. (alpha_find_saved_regs): Use SIGCONTEXT_ADDR macro to extract sigcontext address from frame. (alpha_saved_pc_after_call): When in sigtramp, use alpha_frame_saved_pc() instead of read-register(). (after_prologue): When inside a dynamically generated sigtramp function, there is no prologue, so return address of first instruction. (alpha_in_prologue): Fix typo in comment. (find_proc_desc): Use macro DYNAMIC_SIGTRAMP_OFFSET to determine whether we're inside a dynamicaly generated sigtramp function. If so, create and push and appropriate procedure descriptor. (alpha_frame_chain): Use macro FRAME_PAST_SIGTRAMP_FRAME to obtain the frame past a sigtramp frame (if the current frame is indeed a sigtramp function). (init_extra_frame_info): Don't read next frame register off of stack-pointer when inside a dynamiccaly generated sigtramp. (alpha_pop_frame): Also unlink and destroy procedure descriptors created for dynamically generated sigtramp functions. * alpha-nat.c: When compiling under Linux, include <asm/reg.h> and <alpha/ptrace.h> instead of <machine/reg.h>
1996-04-11 * dcache.c: Add prototypes. Make many functions static.Stu Grossman1-38/+31
* (dcache_peek dcache_fetch dcache_poke): Make dcache_fetch and dcache_poke call dcache_xfer_memory directly in order to fix problems with turning off dcache. dcache_peek is now unnecessary, so it goes away. * defs.h: Define new macros HOST_{FLOAT DOUBLE LONG_DOUBLE}_FORMAT and TARGET_{FLOAT DOUBLE LONG_DOUBLE}_FORMAT to specify a pointer to a struct floatformat. This allows for better handling of targets whose floating point formats differ from the host by more than just byte order. * (floatformat_to_long_double floatformat_from_long_double): Prototypes for new functions in utils.c. * (floatformat_to_doublest floatformat_from_doublest): Prototypes for pointers to floating point conversion functions. The actual function uses either double or long double if the host supports it. * findvar.c (floatformat_to_doublest floatformat_from_doublest): Initialize to point at correct function depending on HAVE_LONG_DOUBLE. * (extract_floating store_floating): Rewrite. Now, if host fp format is the same as the target, we just do a copy. Otherwise, we call floatformat_{to from}_doublest. * remote-nindy.c (nindy_xfer_inferior_memory): Change param `write' to `should_write'. * utils.c (floatformat_to_long_double floatformat_from_long_double): New routines that implement long double versions of functions in libiberty/floatformat.c. * config/i960/tm-i960.h (TARGET_LONG_DOUBLE_FORMAT): Define this for i960 extended real (80 bit) numbers. * nindy-share/nindy.c (ninMemGet ninMemPut): Return number of bytes actually read or written.
1996-03-30 * core-aout.c (fetch_core_registers): Cast core_reg_size to intFred Fish1-2/+2
before testing against reg_ptr. * eval.c (evaluate_subexp_standard): Cast type of TYPE_FN_FIELD_VOFFSET to int. * findvar.c (extract_signed_integer, extract_unsigned_integer, extract_long_unsigned_integer): Cast type of sizeof to int. * values.c (unpack_field_as_long, modify_field): Ditto. * valops.c (value_assign, call_function_by_hand): Ditto. * infcmd.c (do_registers_info): Ditto. * ser-tcp.c (tcp_open): Ditto * remote.c (putpkt): Ditto. * dcache.c (dcache_peek): Ditto. * dcache.c (dcache_poke): Ditto. * m2-exp.y (yylex): Ditto. * gnu-regex.c (re_match_2): Ditto. * f-lang.c (ADD_BF_SYMNUM, saved_bf_list_end, tmp_bf_ptr): Ifdef out unused macro definition and variables. * inftarg.c (proc_wait): Move from main.c to here, and make static. * valprint.c (val_print_string): Change bufsize from int to unsigned. * main.c (wait.h): Include * top.c (command_line_input): Remove unused variable "c". * f-typeprint.c (f_type_print_varspec_prefix): Add missing enum value TYPE_CODE_TYPEDEF to switch statement. (f_type_print_varspec_suffix): Add missing enum value TYPE_CODE_TYPEDEF to switch statement. * ch-exp.c (parse_primval): Add remaining enumeration values to switch statement, with no specific action. (ch_lex): Add LOC_UNRESOLVED in switch statement. (pushback_token): Ifdef out, since code using it is ifdef'd out. * stabsread.c (cleanup_undefined_types): Remove unused label "badtype". * objfiles.h (print_symbol_bcache_statistics): Add prototype. * maint.c (objfiles.h): Include. (maintenance_print_statistics): Remove unused variable "temp". * minsyms.c (lookup_minimal_symbol_solib_trampoline): Remove unused variable "found_file_symbol". * m2-exp.y (yylex): Add LOC_UNRESOLVED case to switch. * language.c (lang_bool_type): Use existing function local type variable rather than create block local variables. * solib.c (disable_break): Enclose in ifndef SVR4_SHARED_LIBS. * infptrace.c (wait.h, command.h): Include. * ser-tcp.c (gdb_string.h): Include * i386-tdep.c (codestream_seek): Change "place" to CORE_ADDR. (i386_get_frame_setup): Change "pc" from int to CORE_ADDR. * command.c (complete_on_enum): Make assignment used as truth value explictly check against NULL. (wait.h): Include. * infrun.c (wait_for_inferior): Ifdef out prologue_pc since code that uses it is ifdef'd out. * parser-defs.h: Add prototype for write_dollar_variable. * infrun.c: Add prototype for write_pc_pid. * breakpoint.h: Add prototype for re_enable_breakpoints_in_shlibs. * symmisc.c (bcache.h): Include. * bcache.h: Add prototype for print_bcache_statistics. * symfile.c: Include <time.h>. * printcmd.c (print_scalar_formatted): Change len to unsigned int. * valarith.c (value_equal): Cast result of TYPE_LENGTH to int. * valarith.c (value_binop): Change result_len, promoted_len1, and promoted_len2 to unsigned int. * valarith.c (value_subscripted_rvalue): Change elt_offs and elt_size to unsigned int. * valops.c (value_array): Change typelength to unsigned int. (destructor_name_p): Change len to unsigned int. * scm-lang.h (scm_parse): Add prototype for scm_unpack. * symfile.c (decrement_reading_symtab): Change return type to void. * valarith.c (value_subscript): Remove unused variable "word". (value_subscript): Remove unused variable "tint". * valops.c (auto_abandon): Ifdef out, since code using it is also ifdef'd out. * eval.c (init_array_element): Remove unused variable "val". * Makefile.in (values.o): Depends on scm-lang.h. (command.o): Depends upon wait_h. (ser-tcp.o): Depends upon gdb_string.h. (infptrace.o): Depends upon wait_h and command_h. (maint.o): Depends on objfiles.h and symfile.h. * values.c (allocate_repeat_value): Remove unused variable "element_type". (scm-lang.h): Include. * breakpoint.c (create_longjmp_breakpoint): Enclose in GET_LONGJMP_TARGET define, unused otherwise. * config/i386/nm-linux.h: Add prototypes for i386_insert_watchpoint, i386_remove_watchpoint and i386_stopped_by_watchpoint.
1996-01-25Thu Jan 25 09:22:15 1996 Steve Chamberlain <sac@slash.cygnus.com>Steve Chamberlain1-2/+2
From Greg McGary <gkm@gnu.ai.mit.edu>: * dcache.c (dcache_peek, dcache_poke): Advance addr for multi-byte I/O.
1995-10-16 * dcache.c: Change default value of remotecache to off. It justStu Grossman1-1/+1
screws up too many targets. * sparcl-stub.c: Add prototypes to many forward decls. * Create private copies of strlen, strcpy, and memcpy to prevent chaos when user steps into them. * (trap_low handle_exception): Clean up DSU support code (hardware breakpoints). Move lots of stuff from asm-land to C-land (make it much easier to #ifdef if necessary). Also, use trap 255 to get into break mode instead of doing a DSU register write, which may trash the register. * (putpacket): Don't check return value of putDebugChar. It returns void...
1995-08-19 * dcache.c (dcache_write_line): Write dirty lines right.Steve Chamberlain1-16/+16
1995-08-02Update FSF address.Fred Fish1-1/+1
1995-08-01* configure.in: Check for working mmap, ansi headers, string.h,J.T. Conklin1-1/+1
strings.h, and memory.h. * configure: Regenerated. * gdb_stat.h: New file, "portable" <sys/stat.h>. * gdb_string.h: New file, "portable" <string.h>. * altos-xdep.c, arm-tdep.c, arm-xdep.c, convex-tdep.c, convex-xdep.c, coredep.c, cxux-nat.c, dbxread.c, exec.c, gould-xdep.c, hppa-tdep.c, i386aix-nat.c, i386b-nat.c, i386mach-nat.c, i386v-nat.c, infptrace.c, m88k-nat.c, main.c, mdebugread.c, objfiles.c, os9kread.c, procfs.c, pyr-xdep.c, rs6000-nat.c, source.c, standalone.c, stuff.c, sun386-nat.c, symfile.c, symm-nat.c, symm-tdep.c, symtab.c, top.c, ultra3-nat.c, ultra3-xdep.c, umax-xdep.c, xcoffread.c: Include "gdb_stat.h" instead of <sys/stat.h>. * alpha-tdep.c, breakpoint.c, buildsym.c, c-typeprint.c, ch-typeprint.c, coffread.c, command.c, core-sol2.c, core-svr4.c, core.c, corelow.c, cp-valprint.c, dbxread.c, dcache.c, demangle.c, dpx2-nat.c, dstread.c, dwarfread.c, elfread.c, environ.c, eval.c, exec.c, f-lang.c, f-typeprint.c, f-valprint.c, findvar.c, fork-child.c, gdbtypes.c, hpread.c, i386-tdep.c, infcmd.c, inflow.c, infptrace.c, infrun.c, irix5-nat.c, language.c, m2-typeprint.c, main.c, mdebugread.c, minsyms.c, mipsread.c, monitor.c, nlmread.c, objfiles.c, os9kread.c, osfsolib.c, parse.c, printcmd.c, procfs.c, regex.c, remote-adapt.c, remote-arc.c, remote-array.c, remote-bug.c, remote-e7000.c, remote-eb.c, remote-es.c, remote-hms.c, remote-mm.c, remote-os9k.c, remote-pa.c, remote-sim.c, remote-st.c, remote-udi.c, remote-utils.c, remote-vx.c, remote-vx29k.c, remote-vx68.c, remote-vx960.c, remote-vxmips.c, remote-vxsparc.c, remote.c, solib.c, somread.c, source.c, stabsread.c, stack.c, symfile.c, symmisc.c, symtab.c, target.c, top.c, typeprint.c, utils.c, valarith.c, valops.c, valprint.c, values.c, xcoffread.c: Include "gdb_string.h" instead of <string.h>. * gdbtk.c: Likewise. * config/xm-sysv4.h, i386/xm-ptx.h, m68k/xm-sun3os4.h, sparc/xm-sun4os4.h (HAVE_MMAP): Removed. * config/xm-lynx.h, config/i386/xm-ptx.h, config/m68k/nm-apollo68b.h, config/m68k/xm-hp300hpux.h, config/mips/xm-irix3.h, config/mips/xm-mips.h, config/mips/xm-news-mips.h, config/mips/xm-riscos.h, config/pa/hppah.h, config/rs6000/xm-rs6000.h, config/sparc/xm-sun4os4.h, config/sparc/xm-sun4sol2.h, config/vax/xm-vaxbsd.h, config/vax/xm-vaxult.h, config/vax/xm-vaxult2.h (MEM_FNS_DECLARED): Removed. * config/mips/xm-irix3.h, config/mips/xm-mips.h, config/pa/xm-hppah.h (memcpy, memset): Removed declarations.
1995-07-18 * dache.c (struct dcache_block): Change data member from unsigned charFred Fish1-11/+11
to char, since everything passed in and out of dcache is char or casted to appropriate type anyway. (dcache_alloc): Move assignment of db out of test and combine separate tests into if-else. (dcache_peek_byte): Change ptr from unsigned char* to char*. (dcache_peek_byte): Remove now unnecessary cast in read_memory call. (dcache_peek): Change cast of incoming data arg. (dcache_poke): Change cast of addr of incoming data arg. (dcache_info): Mask data passed to printf_filtered to lsbyte only. (dcache_info): Change printf_filtered arg from "% 2x" to " %2x". * target.c (debug_to_thread_alive): Change return type to int and return zero, for type compatibility with other *_thread_alive funcs. (cleanup_target): Change cast of ignore function to match type of the to_thread_alive member. * defs.h (error_hook): Add ATTR_NORETURN. * defs.h (NORETURN, ATTR_NORETURN): Switch from volatile to __attribute__ method with gcc 2.7, to avoid gcc 2.6.3 bug. * remote.c (remote_wait): Cast first arg to strtol, strchr, and strncmp to "const char *" from "unsigned char *". (remote_wait): Cast arg to putpkt and strcpy from "unsigned char *" to "char *". (remote_wait): Change printf format for long arg from "%d" to "%ld". (getpkt): Remove unused variable "bp". (remote_fetch_word, remote_store_word): Ifdef out apparently unused functions. * breakpoint.c (watchpoint_check): Removed unused variables "saved_level" and "saved_frame". * valops.c (value_arg_coerce): Add other enum TYPE_CODE_* and default cases to switch for completeness. * infrun.c (wait_for_inferior): Enclose "have_waited" label in #ifdef that matches the one in which it is referenced. * ser-unix.c (hardwire_noflush_set_tty_state): Enclose otherwise unused variable "state" in #ifdef that matches one in which it is referenced. * eval.c (evaluate_subexp_standard): Remove unused variable "var". * eval.c (evaluate_subexp_standard): Remove unused variable "tmp_symbol". * valarith.c (value_subscript): Remove unused variable "lowerbound", which is redeclared in a nested scope prior to use. * printcmd.c (print_frame_nameless_args): Use "%ld" to print long arg, not "%d". * {mem-break.c, remote-pa.c, remote.c, saber.suppress}: Remove unused static var "check_break_insn_size". * buildsym.c (finish_block): Add other enum LOC_* and default cases to switch for completeness. ch-lang.c (type_lower_upper): Removed unused label "retry". Add other enum TYPE_* and default cases to switch for completeness. * f-typeprint.c (f_type_print_args): Ifdef out unused function that may be used someday when Fortran support is complete. * ch-valprint.c (chill_print_type_scalar): Add other enum TYPE_* and default cases to switch for completeness. (chill_val_print): Remove unused local var "high_bound" that is redeclared in a nested scope prior to use. (chill_var_print): Use "%ld" to print long arg, not "%d". * regex.c (re_compile_fastmap, re_match_2): Add remaining enum types and default to switches for completeness. * minsyms.c (lookup_minimal_symbol_text): Delete unused variable "trampoline_symbol". (prim_record_minimal_symbol_and_info): Return NULL rather than trash. * elfread.c (elf_symtab_read): Don't dereference NULL returns from record_minimal_symbol_and_info. * f-lang.c (saved_function_list_end): Ifdef out unused variable that may be used someday. * f-valprint.c (f_val_print): Remove unused local variable "straddr".
1995-06-21Hmm.. The ChangeLog went in, but not the code....Steve Chamberlain1-117/+443
* monitor.c: Turn on caching. (monitor_printf): If a ^C was sent, don't expect to see its echo. (monitor_open): Enable caching. (monitor_resume, monitor_load): Flush cache. (monitor_xfer_memory): Call cache routine. (monitor_dump_regs): New. (monitor_fetch_registers): If monitor_dump_regs available then use it. (monitor_load): Don't ref exec_bfd if it's NULL. (monitor_load_srec): Use new monitor_make_srec calling convention. (monitor_make_srec): Rewrite to cope with two, three and four byte addresses. * remote-hms.c (hms_cmds): Initialze end-of-command delim. * dcache.h, dcache.h: Rewritten. * remote.c: Reenable caching. (getpkt): Reduce MAX_TRIES to 3. (remote_xfer_memory): Use dcache_xfer_memory. * defs.h (error_hook): New. * top.c (error_hook): New definition. * utils.c (error): Use error_hook if initialized. * sparcl-tdep.c (HAVE_SOCKETS): Don't define if GO32 or WIN32. Use HAVE_SOCKETS in place of #ifndef GO32.
1995-02-16Rewrite insque/remque support to cast all pointers to PTR.Michael Meissner1-9/+2
1995-02-16Rewrite Linux insque/remque support again.Michael Meissner1-19/+19
1995-02-15Declare insque/remque as int funcs if not Linux.Michael Meissner1-0/+4
1995-02-15Only protect insque/remque on Linux.Michael Meissner1-1/+1
1995-02-15Define TEXT_SEGMENT_BASE as 1 for ppc-eabi; Make dcache.c compilable on Linux.Michael Meissner1-0/+8
1995-02-10 * Makefile.in (CLIBS): Add $(LIBIBERTY) before, in addition toStan Shebs1-3/+0
after, any host/target/native libraries. * dcache.c (insque, remque): Remove declarations. * gdbtypes.h (type_code): Remove trailing comma. From Peter Schauer: * xcoffread.c (read_xcoff_symtab) [C_HIDEXT]: Move #ifdef STATIC_NODEBUG_VARS inside case.
1993-09-03 * dcache.c: Cast return value from xmalloc.Jim Kingdon1-2/+3
* remote.c: Move setting of immediate_quit from remote_open to remote_start_dummy and set it back to zero when done.
1993-09-01break dcache code out of remote.cK. Richard Pixley1-11/+56
1993-08-31comment changeK. Richard Pixley1-4/+5
1993-08-31break dcache code out of remote-bug.cK. Richard Pixley1-0/+189