X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Ftarget.h;h=31e6e89e690657ef5664492dca20d8a2a9fc1948;hb=c20c1bdf992a90db69c4abb73594b2ff58154ef6;hp=6b5d9bba5b9f5e81517f054d955acaff803c4e5f;hpb=67ac97591175936a06cc1ef1df228746edcdb545;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/target.h b/gdb/target.h index 6b5d9bba5b..31e6e89e69 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -1,5 +1,5 @@ /* Interface between GDB and target environments, including files and processes - Copyright 1990, 1991, 1992 Free Software Foundation, Inc. + Copyright 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. Contributed by Cygnus Support. Written by John Gilmore. This file is part of GDB. @@ -61,7 +61,16 @@ enum target_waitkind { /* The program has terminated with a signal. Which signal is in value.sig. */ - TARGET_WAITKIND_SIGNALLED + TARGET_WAITKIND_SIGNALLED, + + /* The program is letting us know that it dynamically loaded something + (e.g. it called load(2) on AIX). */ + TARGET_WAITKIND_LOADED, + + /* Nothing happened, but we stopped anyway. This perhaps should be handled + within target_wait, but I'm not sure target_wait should be resuming the + inferior. */ + TARGET_WAITKIND_SPURIOUS }; /* The numbering of these signals is chosen to match traditional unix @@ -138,6 +147,10 @@ enum target_signal { /* Some signal we don't know about. */ TARGET_SIGNAL_UNKNOWN, + /* Use whatever signal we use when one is not specifically specified + (for passing to proceed and so on). */ + TARGET_SIGNAL_DEFAULT, + /* Last and unused enum value, for sizing arrays, etc. */ TARGET_SIGNAL_LAST }; @@ -200,6 +213,27 @@ struct target_ops int len, int write, struct target_ops * target)); +#if 0 + /* Enable this after 4.12. */ + + /* Search target memory. Start at STARTADDR and take LEN bytes of + target memory, and them with MASK, and compare to DATA. If they + match, set *ADDR_FOUND to the address we found it at, store the data + we found at LEN bytes starting at DATA_FOUND, and return. If + not, add INCREMENT to the search address and keep trying until + the search address is outside of the range [LORANGE,HIRANGE). + + If we don't find anything, set *ADDR_FOUND to (CORE_ADDR)0 and return. */ + void (*to_search) PARAMS ((int len, char *data, char *mask, + CORE_ADDR startaddr, int increment, + CORE_ADDR lorange, CORE_ADDR hirange, + CORE_ADDR *addr_found, char *data_found)); + +#define target_search(len, data, mask, startaddr, increment, lorange, hirange, addr_found, data_found) \ + (*current_target->to_search) (len, data, mask, startaddr, increment, \ + lorange, hirange, addr_found, data_found) +#endif /* 0 */ + void (*to_files_info) PARAMS ((struct target_ops *)); int (*to_insert_breakpoint) PARAMS ((CORE_ADDR, char *)); int (*to_remove_breakpoint) PARAMS ((CORE_ADDR, char *)); @@ -286,15 +320,20 @@ extern void target_detach PARAMS ((char *, int)); /* Resume execution of the target process PID. STEP says whether to - single-step or to run free; SIGGNAL is the signal value (e.g. SIGINT) to be - given to the target, or zero for no signal. */ + single-step or to run free; SIGGNAL is the signal to be given to + the target, or TARGET_SIGNAL_0 for no signal. The caller may not + pass TARGET_SIGNAL_DEFAULT. */ #define target_resume(pid, step, siggnal) \ (*current_target->to_resume) (pid, step, siggnal) -/* Wait for process pid to do something. Pid = -1 to wait for any pid to do - something. Return pid of child, or -1 in case of error; store status - through argument pointer STATUS. */ +/* Wait for process pid to do something. Pid = -1 to wait for any pid + to do something. Return pid of child, or -1 in case of error; + store status through argument pointer STATUS. Note that it is + *not* OK to return_to_top_level out of target_wait without popping + the debugging target from the stack; GDB isn't prepared to get back + to the prompt with a debugging target but without the frame cache, + stop_pc, etc., set up. */ #define target_wait(pid, status) \ (*current_target->to_wait) (pid, status) @@ -580,7 +619,7 @@ find_core_target PARAMS ((void)); information (higher values, more information). */ extern int remote_debug; -/* Speed in bits per second. */ +/* Speed in bits per second, or -1 which means don't mess with the speed. */ extern int baud_rate; /* Functions for helping to write a native target. */