import gdb-2000-01-05 snapshot
This commit is contained in:
parent
1b45fe546b
commit
c3f6f71df3
74 changed files with 18148 additions and 14752 deletions
8749
gdb/ChangeLog
8749
gdb/ChangeLog
File diff suppressed because it is too large
Load diff
8815
gdb/ChangeLog-99
Normal file
8815
gdb/ChangeLog-99
Normal file
File diff suppressed because it is too large
Load diff
|
@ -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 = 19991221
|
||||
VERSION = 20000105
|
||||
DIST=gdb
|
||||
|
||||
LINT=/usr/5bin/lint
|
||||
|
@ -1415,6 +1415,14 @@ procfs.o: procfs.c $(command_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
|
|||
target.h gdb_string.h
|
||||
$(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $<
|
||||
|
||||
proc_api.o: proc_api.c $(defs_h) $(gdbcmd_h)
|
||||
|
||||
proc_events.o: proc_events.c $(defs_h)
|
||||
|
||||
proc_flags.o: proc_flags.c $(defs_h)
|
||||
|
||||
proc_why.o: proc_why.c $(defs_h)
|
||||
|
||||
sol-thread.o: sol-thread.c $(defs_h) gdbthread.h target.h $(inferior_h) \
|
||||
$(gdbcmd_h)
|
||||
|
||||
|
|
|
@ -10,13 +10,13 @@
|
|||
/* Define if gregset_t type is available. */
|
||||
#undef HAVE_GREGSET_T
|
||||
|
||||
/* Define if you want to use new multi-fd /proc interface
|
||||
(replaces HAVE_MULTIPLE_PROC_FDS as well as other macros). */
|
||||
#undef NEW_PROC_API
|
||||
|
||||
/* Define if ioctl argument PIOCSET is available. */
|
||||
#undef HAVE_PROCFS_PIOCSET
|
||||
|
||||
/* /proc PID entries are directories containing the files
|
||||
ctl as map status */
|
||||
#undef HAVE_MULTIPLE_PROC_FDS
|
||||
|
||||
/* Define if the `long long' type works. */
|
||||
#undef CC_HAS_LONG_LONG
|
||||
|
||||
|
|
427
gdb/breakpoint.c
427
gdb/breakpoint.c
|
@ -4164,107 +4164,135 @@ mention (b)
|
|||
}
|
||||
|
||||
|
||||
/* Set a breakpoint according to ARG (function, linenum or *address)
|
||||
flag: first bit : 0 non-temporary, 1 temporary.
|
||||
second bit : 0 normal breakpoint, 1 hardware breakpoint. */
|
||||
/* Add SALS.nelts breakpoints to the breakpoint table. For each
|
||||
SALS.sal[i] breakpoint, include the corresponding ADDR_STRING[i],
|
||||
COND[i] and COND_STRING[i] values.
|
||||
|
||||
NOTE: If the function succeeds, the caller is expected to cleanup
|
||||
the arrays ADDR_STRING, COND_STRING, COND and SALS (but not the
|
||||
array contents). If the function fails (error() is called), the
|
||||
caller is expected to cleanups both the ADDR_STRING, COND_STRING,
|
||||
COND and SALS arrays and each of those arrays contents. */
|
||||
|
||||
static void
|
||||
break_command_1 (arg, flag, from_tty)
|
||||
char *arg;
|
||||
int flag, from_tty;
|
||||
create_breakpoints (struct symtabs_and_lines sals, char **addr_string,
|
||||
struct expression **cond, char **cond_string,
|
||||
enum bptype type, enum bpdisp disposition,
|
||||
int thread, int ignore_count, int from_tty)
|
||||
{
|
||||
int tempflag, hardwareflag;
|
||||
struct symtabs_and_lines sals;
|
||||
struct symtab_and_line sal;
|
||||
register struct expression *cond = 0;
|
||||
register struct breakpoint *b;
|
||||
if (type == bp_hardware_breakpoint)
|
||||
{
|
||||
int i = hw_breakpoint_used_count ();
|
||||
int target_resources_ok =
|
||||
TARGET_CAN_USE_HARDWARE_WATCHPOINT (bp_hardware_breakpoint,
|
||||
i + sals.nelts, 0);
|
||||
if (target_resources_ok == 0)
|
||||
error ("No hardware breakpoint support in the target.");
|
||||
else if (target_resources_ok < 0)
|
||||
error ("Hardware breakpoints used exceeds limit.");
|
||||
}
|
||||
|
||||
/* Pointers in arg to the start, and one past the end, of the condition. */
|
||||
char *cond_start = NULL;
|
||||
char *cond_end = NULL;
|
||||
/* Pointers in arg to the start, and one past the end,
|
||||
of the address part. */
|
||||
char *addr_start = NULL;
|
||||
char *addr_end = NULL;
|
||||
struct cleanup *old_chain;
|
||||
struct cleanup *canonical_strings_chain = NULL;
|
||||
char **canonical = (char **) NULL;
|
||||
/* Now set all the breakpoints. */
|
||||
{
|
||||
int i;
|
||||
int thread;
|
||||
for (i = 0; i < sals.nelts; i++)
|
||||
{
|
||||
struct breakpoint *b;
|
||||
struct symtab_and_line sal = sals.sals[i];
|
||||
|
||||
hardwareflag = flag & BP_HARDWAREFLAG;
|
||||
tempflag = flag & BP_TEMPFLAG;
|
||||
if (from_tty)
|
||||
describe_other_breakpoints (sal.pc, sal.section);
|
||||
|
||||
sals.sals = NULL;
|
||||
sals.nelts = 0;
|
||||
b = set_raw_breakpoint (sal);
|
||||
set_breakpoint_count (breakpoint_count + 1);
|
||||
b->number = breakpoint_count;
|
||||
b->type = type;
|
||||
b->cond = cond[i];
|
||||
b->thread = thread;
|
||||
b->addr_string = addr_string[i];
|
||||
b->cond_string = cond_string[i];
|
||||
b->ignore_count = ignore_count;
|
||||
b->enable = enabled;
|
||||
b->disposition = disposition;
|
||||
mention (b);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
INIT_SAL (&sal); /* initialize to zeroes */
|
||||
/* Parse ARG which is assumed to be a SAL specification possibly
|
||||
followed by conditionals. On return, SALS contains an array of SAL
|
||||
addresses found. ADDR_STRING contains a vector of (canonical)
|
||||
address strings. ARG points to the end of the SAL. */
|
||||
|
||||
/* If no arg given, or if first arg is 'if ', use the default breakpoint. */
|
||||
|
||||
if (!arg || (arg[0] == 'i' && arg[1] == 'f'
|
||||
&& (arg[2] == ' ' || arg[2] == '\t')))
|
||||
void
|
||||
parse_breakpoint_sals (char **address,
|
||||
struct symtabs_and_lines *sals,
|
||||
char ***addr_string)
|
||||
{
|
||||
char *addr_start = *address;
|
||||
*addr_string = NULL;
|
||||
/* If no arg given, or if first arg is 'if ', use the default
|
||||
breakpoint. */
|
||||
if ((*address) == NULL
|
||||
|| (strncmp ((*address), "if", 2) == 0 && isspace ((*address)[2])))
|
||||
{
|
||||
if (default_breakpoint_valid)
|
||||
{
|
||||
sals.sals = (struct symtab_and_line *)
|
||||
struct symtab_and_line sal;
|
||||
INIT_SAL (&sal); /* initialize to zeroes */
|
||||
sals->sals = (struct symtab_and_line *)
|
||||
xmalloc (sizeof (struct symtab_and_line));
|
||||
sal.pc = default_breakpoint_address;
|
||||
sal.line = default_breakpoint_line;
|
||||
sal.symtab = default_breakpoint_symtab;
|
||||
sal.section = find_pc_overlay (sal.pc);
|
||||
sals.sals[0] = sal;
|
||||
sals.nelts = 1;
|
||||
sals->sals[0] = sal;
|
||||
sals->nelts = 1;
|
||||
}
|
||||
else
|
||||
error ("No default breakpoint address now.");
|
||||
}
|
||||
else
|
||||
{
|
||||
addr_start = arg;
|
||||
|
||||
/* Force almost all breakpoints to be in terms of the
|
||||
current_source_symtab (which is decode_line_1's default). This
|
||||
should produce the results we want almost all of the time while
|
||||
leaving default_breakpoint_* alone. */
|
||||
if (default_breakpoint_valid
|
||||
&& (!current_source_symtab
|
||||
|| (arg && (*arg == '+' || *arg == '-'))))
|
||||
sals = decode_line_1 (&arg, 1, default_breakpoint_symtab,
|
||||
default_breakpoint_line, &canonical);
|
||||
|| (strchr ("+-", (*address)[0]) != NULL)))
|
||||
*sals = decode_line_1 (address, 1, default_breakpoint_symtab,
|
||||
default_breakpoint_line, addr_string);
|
||||
else
|
||||
sals = decode_line_1 (&arg, 1, (struct symtab *) NULL, 0, &canonical);
|
||||
|
||||
addr_end = arg;
|
||||
*sals = decode_line_1 (address, 1, (struct symtab *) NULL, 0, addr_string);
|
||||
}
|
||||
|
||||
if (!sals.nelts)
|
||||
return;
|
||||
|
||||
/* Make sure that all storage allocated in decode_line_1 gets freed
|
||||
in case the following `for' loop errors out. */
|
||||
old_chain = make_cleanup (free, sals.sals);
|
||||
if (canonical != (char **) NULL)
|
||||
/* For any SAL that didn't have a canonical string, fill one in. */
|
||||
if (sals->nelts > 0 && *addr_string == NULL)
|
||||
*addr_string = xcalloc (sals->nelts, sizeof (char **));
|
||||
if (addr_start != (*address))
|
||||
{
|
||||
make_cleanup (free, canonical);
|
||||
canonical_strings_chain = make_cleanup (null_cleanup, 0);
|
||||
for (i = 0; i < sals.nelts; i++)
|
||||
int i;
|
||||
for (i = 0; i < sals->nelts; i++)
|
||||
{
|
||||
if (canonical[i] != NULL)
|
||||
make_cleanup (free, canonical[i]);
|
||||
/* Add the string if not present. */
|
||||
if ((*addr_string)[i] == NULL)
|
||||
(*addr_string)[i] = savestring (addr_start, (*address) - addr_start);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
thread = -1; /* No specific thread yet */
|
||||
|
||||
/* Resolve all line numbers to PC's, and verify that conditions
|
||||
can be parsed, before setting any breakpoints. */
|
||||
for (i = 0; i < sals.nelts; i++)
|
||||
/* Convert each SAL into a real PC. Verify that the PC can be
|
||||
inserted as a breakpoint. If it can't throw an error. */
|
||||
|
||||
void
|
||||
breakpoint_sals_to_pc (struct symtabs_and_lines *sals,
|
||||
char *address)
|
||||
{
|
||||
char *tok, *end_tok;
|
||||
int toklen;
|
||||
|
||||
resolve_sal_pc (&sals.sals[i]);
|
||||
int i;
|
||||
for (i = 0; i < sals->nelts; i++)
|
||||
{
|
||||
resolve_sal_pc (&sals->sals[i]);
|
||||
|
||||
/* It's possible for the PC to be nonzero, but still an illegal
|
||||
value on some targets.
|
||||
|
@ -4279,16 +4307,100 @@ break_command_1 (arg, flag, from_tty)
|
|||
|
||||
Give the target a chance to bless sals.sals[i].pc before we
|
||||
try to make a breakpoint for it. */
|
||||
if (PC_REQUIRES_RUN_BEFORE_USE (sals.sals[i].pc))
|
||||
if (PC_REQUIRES_RUN_BEFORE_USE (sals->sals[i].pc))
|
||||
{
|
||||
if (address == NULL)
|
||||
error ("Cannot break without a running program.");
|
||||
else
|
||||
error ("Cannot break on %s without a running program.",
|
||||
addr_start);
|
||||
address);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tok = arg;
|
||||
/* Set a breakpoint according to ARG (function, linenum or *address)
|
||||
flag: first bit : 0 non-temporary, 1 temporary.
|
||||
second bit : 0 normal breakpoint, 1 hardware breakpoint. */
|
||||
|
||||
static void
|
||||
break_command_1 (arg, flag, from_tty)
|
||||
char *arg;
|
||||
int flag, from_tty;
|
||||
{
|
||||
int tempflag, hardwareflag;
|
||||
struct symtabs_and_lines sals;
|
||||
register struct expression **cond = 0;
|
||||
/* Pointers in arg to the start, and one past the end, of the
|
||||
condition. */
|
||||
char **cond_string = (char **) NULL;
|
||||
char *addr_start = arg;
|
||||
char **addr_string;
|
||||
struct cleanup *old_chain;
|
||||
struct cleanup *breakpoint_chain = NULL;
|
||||
int i;
|
||||
int thread = -1;
|
||||
int ignore_count = 0;
|
||||
|
||||
hardwareflag = flag & BP_HARDWAREFLAG;
|
||||
tempflag = flag & BP_TEMPFLAG;
|
||||
|
||||
sals.sals = NULL;
|
||||
sals.nelts = 0;
|
||||
addr_string = NULL;
|
||||
parse_breakpoint_sals (&arg, &sals, &addr_string);
|
||||
|
||||
if (!sals.nelts)
|
||||
return;
|
||||
|
||||
/* Create a chain of things that always need to be cleaned up. */
|
||||
old_chain = make_cleanup (null_cleanup, 0);
|
||||
|
||||
/* Make sure that all storage allocated to SALS gets freed. */
|
||||
make_cleanup (free, sals.sals);
|
||||
|
||||
/* Cleanup the addr_string array but not its contents. */
|
||||
make_cleanup (free, addr_string);
|
||||
|
||||
/* Allocate space for all the cond expressions. */
|
||||
cond = xcalloc (sals.nelts, sizeof (struct expression *));
|
||||
make_cleanup (free, cond);
|
||||
|
||||
/* Allocate space for all the cond strings. */
|
||||
cond_string = xcalloc (sals.nelts, sizeof (char **));
|
||||
make_cleanup (free, cond_string);
|
||||
|
||||
/* ----------------------------- SNIP -----------------------------
|
||||
Anything added to the cleanup chain beyond this point is assumed
|
||||
to be part of a breakpoint. If the breakpoint create succeeds
|
||||
then the memory is not reclaimed. */
|
||||
breakpoint_chain = make_cleanup (null_cleanup, 0);
|
||||
|
||||
/* Mark the contents of the addr_string for cleanup. These go on
|
||||
the breakpoint_chain and only occure if the breakpoint create
|
||||
fails. */
|
||||
for (i = 0; i < sals.nelts; i++)
|
||||
{
|
||||
if (addr_string[i] != NULL)
|
||||
make_cleanup (free, addr_string[i]);
|
||||
}
|
||||
|
||||
/* Resolve all line numbers to PC's and verify that the addresses
|
||||
are ok for the target. */
|
||||
breakpoint_sals_to_pc (&sals, addr_start);
|
||||
|
||||
/* Verify that condition can be parsed, before setting any
|
||||
breakpoints. Allocate a separate condition expression for each
|
||||
breakpoint. */
|
||||
thread = -1; /* No specific thread yet */
|
||||
for (i = 0; i < sals.nelts; i++)
|
||||
{
|
||||
char *tok = arg;
|
||||
while (tok && *tok)
|
||||
{
|
||||
char *end_tok;
|
||||
int toklen;
|
||||
char *cond_start = NULL;
|
||||
char *cond_end = NULL;
|
||||
while (*tok == ' ' || *tok == '\t')
|
||||
tok++;
|
||||
|
||||
|
@ -4302,8 +4414,11 @@ break_command_1 (arg, flag, from_tty)
|
|||
if (toklen >= 1 && strncmp (tok, "if", toklen) == 0)
|
||||
{
|
||||
tok = cond_start = end_tok + 1;
|
||||
cond = parse_exp_1 (&tok, block_for_pc (sals.sals[i].pc), 0);
|
||||
cond[i] = parse_exp_1 (&tok, block_for_pc (sals.sals[i].pc), 0);
|
||||
make_cleanup (free, cond[i]);
|
||||
cond_end = tok;
|
||||
cond_string[i] = savestring (cond_start, cond_end - cond_start);
|
||||
make_cleanup (free, cond_string[i]);
|
||||
}
|
||||
else if (toklen >= 1 && strncmp (tok, "thread", toklen) == 0)
|
||||
{
|
||||
|
@ -4321,61 +4436,149 @@ break_command_1 (arg, flag, from_tty)
|
|||
error ("Junk at end of arguments.");
|
||||
}
|
||||
}
|
||||
if (hardwareflag)
|
||||
{
|
||||
int i, target_resources_ok;
|
||||
|
||||
i = hw_breakpoint_used_count ();
|
||||
target_resources_ok =
|
||||
TARGET_CAN_USE_HARDWARE_WATCHPOINT (bp_hardware_breakpoint,
|
||||
i + sals.nelts, 0);
|
||||
if (target_resources_ok == 0)
|
||||
error ("No hardware breakpoint support in the target.");
|
||||
else if (target_resources_ok < 0)
|
||||
error ("Hardware breakpoints used exceeds limit.");
|
||||
}
|
||||
|
||||
/* Remove the canonical strings from the cleanup, they are needed below. */
|
||||
if (canonical != (char **) NULL)
|
||||
discard_cleanups (canonical_strings_chain);
|
||||
|
||||
/* Now set all the breakpoints. */
|
||||
for (i = 0; i < sals.nelts; i++)
|
||||
{
|
||||
sal = sals.sals[i];
|
||||
|
||||
if (from_tty)
|
||||
describe_other_breakpoints (sal.pc, sal.section);
|
||||
|
||||
b = set_raw_breakpoint (sal);
|
||||
set_breakpoint_count (breakpoint_count + 1);
|
||||
b->number = breakpoint_count;
|
||||
b->type = hardwareflag ? bp_hardware_breakpoint : bp_breakpoint;
|
||||
b->cond = cond;
|
||||
b->thread = thread;
|
||||
|
||||
/* If a canonical line spec is needed use that instead of the
|
||||
command string. */
|
||||
if (canonical != (char **) NULL && canonical[i] != NULL)
|
||||
b->addr_string = canonical[i];
|
||||
else if (addr_start)
|
||||
b->addr_string = savestring (addr_start, addr_end - addr_start);
|
||||
if (cond_start)
|
||||
b->cond_string = savestring (cond_start, cond_end - cond_start);
|
||||
|
||||
b->enable = enabled;
|
||||
b->disposition = tempflag ? del : donttouch;
|
||||
mention (b);
|
||||
}
|
||||
create_breakpoints (sals, addr_string, cond, cond_string,
|
||||
hardwareflag ? bp_hardware_breakpoint : bp_breakpoint,
|
||||
tempflag ? del : donttouch,
|
||||
thread, ignore_count, from_tty);
|
||||
|
||||
if (sals.nelts > 1)
|
||||
{
|
||||
warning ("Multiple breakpoints were set.");
|
||||
warning ("Use the \"delete\" command to delete unwanted breakpoints.");
|
||||
}
|
||||
/* That's it. Discard the cleanups for data inserted into the
|
||||
breakpoint. */
|
||||
discard_cleanups (breakpoint_chain);
|
||||
/* But cleanup everything else. */
|
||||
do_cleanups (old_chain);
|
||||
}
|
||||
|
||||
/* Set a breakpoint of TYPE/DISPOSITION according to ARG (function,
|
||||
linenum or *address) with COND and IGNORE_COUNT. */
|
||||
|
||||
struct captured_breakpoint_args
|
||||
{
|
||||
char *address;
|
||||
char *condition;
|
||||
int hardwareflag;
|
||||
int tempflag;
|
||||
int thread;
|
||||
int ignore_count;
|
||||
};
|
||||
|
||||
static int
|
||||
do_captured_breakpoint (void *data)
|
||||
{
|
||||
struct captured_breakpoint_args *args = data;
|
||||
struct symtabs_and_lines sals;
|
||||
register struct expression **cond;
|
||||
struct cleanup *old_chain;
|
||||
struct cleanup *breakpoint_chain = NULL;
|
||||
int i;
|
||||
char **addr_string;
|
||||
char **cond_string;
|
||||
|
||||
char *address_end;
|
||||
|
||||
/* Parse the source and lines spec. Delay check that the expression
|
||||
didn't contain trailing garbage until after cleanups are in
|
||||
place. */
|
||||
sals.sals = NULL;
|
||||
sals.nelts = 0;
|
||||
address_end = args->address;
|
||||
addr_string = NULL;
|
||||
parse_breakpoint_sals (&address_end, &sals, &addr_string);
|
||||
|
||||
if (!sals.nelts)
|
||||
return GDB_RC_NONE;
|
||||
|
||||
/* Create a chain of things at always need to be cleaned up. */
|
||||
old_chain = make_cleanup (null_cleanup, 0);
|
||||
|
||||
/* Always have a addr_string array, even if it is empty. */
|
||||
make_cleanup (free, addr_string);
|
||||
|
||||
/* Make sure that all storage allocated to SALS gets freed. */
|
||||
make_cleanup (free, sals.sals);
|
||||
|
||||
/* Allocate space for all the cond expressions. */
|
||||
cond = xcalloc (sals.nelts, sizeof (struct expression *));
|
||||
make_cleanup (free, cond);
|
||||
|
||||
/* Allocate space for all the cond strings. */
|
||||
cond_string = xcalloc (sals.nelts, sizeof (char **));
|
||||
make_cleanup (free, cond_string);
|
||||
|
||||
/* ----------------------------- SNIP -----------------------------
|
||||
Anything added to the cleanup chain beyond this point is assumed
|
||||
to be part of a breakpoint. If the breakpoint create goes
|
||||
through then that memory is not cleaned up. */
|
||||
breakpoint_chain = make_cleanup (null_cleanup, 0);
|
||||
|
||||
/* Mark the contents of the addr_string for cleanup. These go on
|
||||
the breakpoint_chain and only occure if the breakpoint create
|
||||
fails. */
|
||||
for (i = 0; i < sals.nelts; i++)
|
||||
{
|
||||
if (addr_string[i] != NULL)
|
||||
make_cleanup (free, addr_string[i]);
|
||||
}
|
||||
|
||||
/* Wait until now before checking for garbage at the end of the
|
||||
address. That way cleanups can take care of freeing any
|
||||
memory. */
|
||||
if (*address_end != '\0')
|
||||
error ("Garbage %s following breakpoint address", address_end);
|
||||
|
||||
/* Resolve all line numbers to PC's. */
|
||||
breakpoint_sals_to_pc (&sals, args->address);
|
||||
|
||||
/* Verify that conditions can be parsed, before setting any
|
||||
breakpoints. */
|
||||
for (i = 0; i < sals.nelts; i++)
|
||||
{
|
||||
if (args->condition != NULL)
|
||||
{
|
||||
char *tok = args->condition;
|
||||
cond[i] = parse_exp_1 (&tok, block_for_pc (sals.sals[i].pc), 0);
|
||||
if (*tok != '\0')
|
||||
error ("Garbage %s follows condition", tok);
|
||||
make_cleanup (free, cond[i]);
|
||||
cond_string[i] = xstrdup (args->condition);
|
||||
}
|
||||
}
|
||||
|
||||
create_breakpoints (sals, addr_string, cond, cond_string,
|
||||
args->hardwareflag ? bp_hardware_breakpoint : bp_breakpoint,
|
||||
args->tempflag ? del : donttouch,
|
||||
args->thread, args->ignore_count, 0/*from-tty*/);
|
||||
|
||||
/* That's it. Discard the cleanups for data inserted into the
|
||||
breakpoint. */
|
||||
discard_cleanups (breakpoint_chain);
|
||||
/* But cleanup everything else. */
|
||||
do_cleanups (old_chain);
|
||||
return GDB_RC_OK;
|
||||
}
|
||||
|
||||
enum gdb_rc
|
||||
gdb_breakpoint (char *address, char *condition,
|
||||
int hardwareflag, int tempflag,
|
||||
int thread, int ignore_count)
|
||||
{
|
||||
struct captured_breakpoint_args args;
|
||||
args.address = address;
|
||||
args.condition = condition;
|
||||
args.hardwareflag = hardwareflag;
|
||||
args.tempflag = tempflag;
|
||||
args.thread = thread;
|
||||
args.ignore_count = ignore_count;
|
||||
return catch_errors (do_captured_breakpoint, &args,
|
||||
NULL, RETURN_MASK_ALL);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
break_at_finish_at_depth_command_1 (arg, flag, from_tty)
|
||||
char *arg;
|
||||
|
|
|
@ -62,9 +62,9 @@
|
|||
/* Define if ioctl argument PIOCSET is available. */
|
||||
#undef HAVE_PROCFS_PIOCSET
|
||||
|
||||
/* /proc PID entries are directories containing the files
|
||||
ctl as map status */
|
||||
#undef HAVE_MULTIPLE_PROC_FDS
|
||||
/* Define if you want to use new multi-fd /proc interface
|
||||
(replaces HAVE_MULTIPLE_PROC_FDS as well as other macros). */
|
||||
#undef NEW_PROC_API
|
||||
|
||||
/* Define if the `long long' type works. */
|
||||
#undef CC_HAS_LONG_LONG
|
||||
|
|
|
@ -2,4 +2,5 @@
|
|||
XDEPFILES=
|
||||
XM_FILE= xm-alphaosf.h
|
||||
NAT_FILE= nm-osf2.h
|
||||
NATDEPFILES= infptrace.o inftarg.o corelow.o alpha-nat.o fork-child.o osfsolib.o procfs.o
|
||||
NATDEPFILES= infptrace.o inftarg.o corelow.o alpha-nat.o fork-child.o \
|
||||
osfsolib.o procfs.o proc_api.o proc_events.o proc_flags.o proc_why.o
|
||||
|
|
|
@ -2,4 +2,6 @@
|
|||
XDEPFILES=
|
||||
XM_FILE= xm-alphaosf.h
|
||||
NAT_FILE= nm-osf3.h
|
||||
NATDEPFILES= infptrace.o inftarg.o corelow.o alpha-nat.o fork-child.o osfsolib.o procfs.o
|
||||
NATDEPFILES= infptrace.o inftarg.o corelow.o alpha-nat.o fork-child.o \
|
||||
osfsolib.o procfs.o proc_api.o proc_events.o proc_flags.o proc_why.o
|
||||
|
||||
|
|
|
@ -6,4 +6,5 @@ XDEPFILES= ser-tcp.o
|
|||
XM_CLIBS= -lsocket -lnsl
|
||||
|
||||
NAT_FILE= nm-i386v4.h
|
||||
NATDEPFILES= corelow.o core-regset.o solib.o procfs.o fork-child.o i386v4-nat.o
|
||||
NATDEPFILES= corelow.o core-regset.o solib.o fork-child.o i386v4-nat.o \
|
||||
procfs.o proc_api.o proc_events.o proc_flags.o proc_why.o
|
||||
|
|
|
@ -4,4 +4,5 @@ XM_FILE= xm-i386v4.h
|
|||
XDEPFILES=
|
||||
|
||||
NAT_FILE= nm-i386sol2.h
|
||||
NATDEPFILES= core-regset.o procfs.o fork-child.o i386v4-nat.o corelow.o
|
||||
NATDEPFILES= core-regset.o fork-child.o i386v4-nat.o corelow.o procfs.o \
|
||||
proc_api.o proc_events.o proc_flags.o proc_why.o
|
||||
|
|
|
@ -6,4 +6,5 @@ XDEPFILES=
|
|||
XM_CLIBS= -lsocket -lnsl
|
||||
|
||||
NAT_FILE= nm-i386v4.h
|
||||
NATDEPFILES= corelow.o core-regset.o solib.o procfs.o fork-child.o i386v4-nat.o
|
||||
NATDEPFILES= corelow.o core-regset.o solib.o fork-child.o i386v4-nat.o \
|
||||
procfs.o proc_api.o proc_events.o proc_flags.o proc_why.o
|
||||
|
|
|
@ -8,4 +8,6 @@ XM_CLIBS= -lsocket -lnsl
|
|||
# we don't want nm-i386v4.h since that defines LOSING_POLL which isn't
|
||||
# appropriate for i386v42mp
|
||||
NAT_FILE= nm-i386v42mp.h
|
||||
NATDEPFILES= corelow.o core-regset.o solib.o procfs.o fork-child.o i386v4-nat.o
|
||||
NATDEPFILES= corelow.o core-regset.o solib.o fork-child.o i386v4-nat.o \
|
||||
procfs.o proc_api.o proc_events.o proc_flags.o proc_why.o
|
||||
|
||||
|
|
|
@ -13,4 +13,5 @@ XM_FILE= xm-i386v4.h
|
|||
XDEPFILES=
|
||||
|
||||
NAT_FILE= nm-i386v4.h
|
||||
NATDEPFILES= corelow.o core-regset.o procfs.o fork-child.o i386v4-nat.o
|
||||
NATDEPFILES= corelow.o core-regset.o fork-child.o i386v4-nat.o procfs.o \
|
||||
proc_api.o proc_events.o proc_flags.o proc_why.o
|
||||
|
|
|
@ -4,4 +4,5 @@ XM_FILE= xm-m68kv4.h
|
|||
XDEPFILES=
|
||||
|
||||
NAT_FILE= nm-sysv4.h
|
||||
NATDEPFILES= corelow.o core-regset.o solib.o procfs.o fork-child.o
|
||||
NATDEPFILES= corelow.o core-regset.o solib.o fork-child.o procfs.o \
|
||||
proc_api.o proc_events.o proc_flags.o proc_why.o
|
||||
|
|
|
@ -4,4 +4,5 @@ XM_FILE= xm-delta88v4.h
|
|||
XDEPFILES=
|
||||
|
||||
NAT_FILE= nm-delta88v4.h
|
||||
NATDEPFILES= fork-child.o m88k-nat.o corelow.o core-regset.o procfs.o solib.o
|
||||
NATDEPFILES= fork-child.o m88k-nat.o corelow.o core-regset.o solib.o \
|
||||
procfs.o proc_api.o proc_events.o proc_flags.o proc_why.o
|
||||
|
|
|
@ -2,7 +2,10 @@
|
|||
XDEPFILES= ser-tcp.o
|
||||
XM_FILE= xm-irix4.h
|
||||
NAT_FILE= nm-irix4.h
|
||||
NATDEPFILES= fork-child.o procfs.o irix4-nat.o corelow.o
|
||||
NATDEPFILES= fork-child.o irix4-nat.o corelow.o procfs.o \
|
||||
proc_api.o proc_events.o proc_flags.o proc_why.o
|
||||
|
||||
|
||||
XM_CLIBS=-lbsd -lsun
|
||||
# use cc in K&R mode, bump up some static compiler tables.
|
||||
CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh1100
|
||||
|
|
|
@ -2,5 +2,7 @@
|
|||
XDEPFILES= ser-tcp.o
|
||||
XM_FILE= xm-irix5.h
|
||||
NAT_FILE= nm-irix5.h
|
||||
NATDEPFILES= fork-child.o procfs.o irix5-nat.o corelow.o
|
||||
NATDEPFILES= fork-child.o irix5-nat.o corelow.o procfs.o \
|
||||
proc_api.o proc_events.o proc_flags.o proc_why.o
|
||||
|
||||
XM_CLIBS=-lbsd -lsun
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
# Host: Mips running SVR4
|
||||
XM_FILE= xm-mipsv4.h
|
||||
NAT_FILE= ../nm-sysv4.h
|
||||
NATDEPFILES= fork-child.o procfs.o mipsv4-nat.o corelow.o core-regset.o solib.o
|
||||
NATDEPFILES= fork-child.o mipsv4-nat.o corelow.o core-regset.o solib.o \
|
||||
procfs.o proc_api.o proc_events.o proc_flags.o proc_why.o
|
||||
|
|
|
@ -57,6 +57,10 @@ extern int procfs_stopped_by_watchpoint PARAMS ((int));
|
|||
|
||||
/* Use these macros for watchpoint insertion/deletion. */
|
||||
/* type can be 0: write watch, 1: read watch, 2: access watch (read/write) */
|
||||
#define target_insert_watchpoint(addr, len, type) procfs_set_watchpoint (inferior_pid, addr, len, 2)
|
||||
#define target_remove_watchpoint(addr, len, type) procfs_set_watchpoint (inferior_pid, addr, 0, 0)
|
||||
extern int procfs_set_watchpoint PARAMS ((int, CORE_ADDR, int, int));
|
||||
#define target_insert_watchpoint(ADDR, LEN, TYPE) \
|
||||
procfs_set_watchpoint (inferior_pid, ADDR, LEN, TYPE, 0)
|
||||
#define target_remove_watchpoint(ADDR, LEN, TYPE) \
|
||||
procfs_set_watchpoint (inferior_pid, ADDR, 0, 0, 0)
|
||||
extern int procfs_set_watchpoint PARAMS ((int, CORE_ADDR, int, int, int));
|
||||
|
||||
#define TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(SIZE) 1
|
||||
|
|
|
@ -24,9 +24,7 @@
|
|||
|
||||
#define TARGET_HAS_HARDWARE_WATCHPOINTS
|
||||
|
||||
/* Temporary new watchpoint stuff */
|
||||
#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) \
|
||||
((type) == bp_hardware_watchpoint)
|
||||
#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) 1
|
||||
|
||||
/* When a hardware watchpoint fires off the PC will be left at the
|
||||
instruction which caused the watchpoint. It will be necessary for
|
||||
|
@ -40,6 +38,10 @@ extern int procfs_stopped_by_watchpoint PARAMS ((int));
|
|||
|
||||
/* Use these macros for watchpoint insertion/deletion. */
|
||||
/* type can be 0: write watch, 1: read watch, 2: access watch (read/write) */
|
||||
#define target_insert_watchpoint(addr, len, type) procfs_set_watchpoint (inferior_pid, addr, len, 2)
|
||||
#define target_remove_watchpoint(addr, len, type) procfs_set_watchpoint (inferior_pid, addr, 0, 0)
|
||||
extern int procfs_set_watchpoint PARAMS ((int, CORE_ADDR, int, int));
|
||||
#define target_insert_watchpoint(ADDR, LEN, TYPE) \
|
||||
procfs_set_watchpoint (inferior_pid, ADDR, LEN, TYPE, 0)
|
||||
#define target_remove_watchpoint(ADDR, LEN, TYPE) \
|
||||
procfs_set_watchpoint (inferior_pid, ADDR, 0, 0, 0)
|
||||
extern int procfs_set_watchpoint PARAMS ((int, CORE_ADDR, int, int, int));
|
||||
|
||||
#define TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(SIZE) 1
|
||||
|
|
|
@ -5,7 +5,8 @@ XDEPFILES= ser-tcp.o
|
|||
XM_CLIBS= -lsocket -lnsl
|
||||
|
||||
NAT_FILE= nm-solaris.h
|
||||
NATDEPFILES= corelow.o core-sol2.o solib.o procfs.o fork-child.o
|
||||
NATDEPFILES= corelow.o core-sol2.o solib.o fork-child.o procfs.o \
|
||||
proc_api.o proc_events.o proc_flags.o proc_why.o
|
||||
|
||||
# If you are compiling with Sun's compiler, add the -xs option to CC
|
||||
# (e.g. `make CC="cc -xs"').
|
||||
|
|
|
@ -5,7 +5,8 @@ XDEPFILES= ser-tcp.o
|
|||
XM_CLIBS= -lsocket -lnsl
|
||||
|
||||
NAT_FILE= nm-sun4sol2.h
|
||||
NATDEPFILES= corelow.o core-sol2.o solib.o procfs.o fork-child.o
|
||||
NATDEPFILES= corelow.o core-sol2.o solib.o fork-child.o procfs.o \
|
||||
proc_api.o proc_events.o proc_flags.o proc_why.o
|
||||
|
||||
# If you are compiling with Sun's compiler, add the -xs option to CC
|
||||
# (e.g. `make CC="cc -xs"').
|
||||
|
|
219
gdb/configure
vendored
219
gdb/configure
vendored
|
@ -4156,10 +4156,9 @@ echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
|
|||
|
||||
# If we are configured native on GNU/Linux, work around problems with
|
||||
# sys/procfs.h
|
||||
# Also detect which type of /proc is in use, such as for Unixware.
|
||||
# Also detect which type of /proc is in use, such as for Unixware or Solaris.
|
||||
|
||||
if test "${target}" = "${host}"; then
|
||||
gdb_cv_hostos_is_solaris=no
|
||||
case "${host}" in
|
||||
i[3456]86-*-linux*)
|
||||
cat >> confdefs.h <<\EOF
|
||||
|
@ -4171,45 +4170,39 @@ EOF
|
|||
EOF
|
||||
|
||||
;;
|
||||
*-*-solaris*)
|
||||
gdb_cv_hostos_is_solaris=yes ;;
|
||||
esac
|
||||
echo $ac_n "checking for directory proc entries""... $ac_c" 1>&6
|
||||
echo "configure:4179: checking for directory proc entries" >&5
|
||||
# The [gdb_host != sun4sol2] hack is because Solaris does provide the
|
||||
# multiple procfs files as of Solaris 2.6, but GDB can't use it right now.
|
||||
if test "$ac_cv_header_sys_procfs_h" = yes -a \
|
||||
"$gdb_cv_hostos_is_solaris" = no \
|
||||
-a -d /proc/$$ \
|
||||
-a -f /proc/$$/ctl \
|
||||
-a -f /proc/$$/as \
|
||||
-a -f /proc/$$/map \
|
||||
-a -f /proc/$$/status; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
*-*-unixware* | *-*-sysv4.2uw2.* | *-*-sysv4.2uw7.*)
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define HAVE_MULTIPLE_PROC_FDS 1
|
||||
#define NEW_PROC_API 1
|
||||
EOF
|
||||
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
;;
|
||||
# FIXME: we would like to define NEW_PROC_API for all versions of
|
||||
# Solaris from 2.6 on... but it isn't quite working yet. Seems
|
||||
# to work on sparc 2.6, so let's try it out there.
|
||||
sparc-sun-solaris2.6)
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define NEW_PROC_API 1
|
||||
EOF
|
||||
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if test "$ac_cv_header_sys_procfs_h" = yes; then
|
||||
echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
|
||||
echo "configure:4201: checking for pstatus_t in sys/procfs.h" >&5
|
||||
echo "configure:4194: checking for pstatus_t in sys/procfs.h" >&5
|
||||
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4206 "configure"
|
||||
#line 4199 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/procfs.h>
|
||||
int main() {
|
||||
pstatus_t avar
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:4213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:4206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
bfd_cv_have_sys_procfs_type_pstatus_t=yes
|
||||
else
|
||||
|
@ -4231,19 +4224,19 @@ EOF
|
|||
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
|
||||
|
||||
echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
|
||||
echo "configure:4235: checking for prrun_t in sys/procfs.h" >&5
|
||||
echo "configure:4228: checking for prrun_t in sys/procfs.h" >&5
|
||||
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4240 "configure"
|
||||
#line 4233 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/procfs.h>
|
||||
int main() {
|
||||
prrun_t avar
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:4247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:4240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
bfd_cv_have_sys_procfs_type_prrun_t=yes
|
||||
else
|
||||
|
@ -4265,19 +4258,19 @@ EOF
|
|||
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
|
||||
|
||||
echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
|
||||
echo "configure:4269: checking for gregset_t in sys/procfs.h" >&5
|
||||
echo "configure:4262: checking for gregset_t in sys/procfs.h" >&5
|
||||
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4274 "configure"
|
||||
#line 4267 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/procfs.h>
|
||||
int main() {
|
||||
gregset_t avar
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:4281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:4274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
bfd_cv_have_sys_procfs_type_gregset_t=yes
|
||||
else
|
||||
|
@ -4299,19 +4292,19 @@ EOF
|
|||
echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
|
||||
|
||||
echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
|
||||
echo "configure:4303: checking for fpregset_t in sys/procfs.h" >&5
|
||||
echo "configure:4296: checking for fpregset_t in sys/procfs.h" >&5
|
||||
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4308 "configure"
|
||||
#line 4301 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/procfs.h>
|
||||
int main() {
|
||||
fpregset_t avar
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:4315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:4308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
bfd_cv_have_sys_procfs_type_fpregset_t=yes
|
||||
else
|
||||
|
@ -4335,12 +4328,12 @@ EOF
|
|||
|
||||
|
||||
echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
|
||||
echo "configure:4339: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
|
||||
echo "configure:4332: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
|
||||
if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4344 "configure"
|
||||
#line 4337 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
|
@ -4353,7 +4346,7 @@ int main() {
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:4357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:4350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
gdb_cv_have_procfs_piocset=yes
|
||||
else
|
||||
|
@ -4375,7 +4368,7 @@ EOF
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
|
||||
echo "configure:4379: checking for main in -lm" >&5
|
||||
echo "configure:4372: checking for main in -lm" >&5
|
||||
ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -4383,14 +4376,14 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lm $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4387 "configure"
|
||||
#line 4380 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
main()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:4394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:4387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
|
@ -4419,7 +4412,7 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6
|
||||
echo "configure:4423: checking for wctype in -lc" >&5
|
||||
echo "configure:4416: checking for wctype in -lc" >&5
|
||||
ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -4427,7 +4420,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lc $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4431 "configure"
|
||||
#line 4424 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
|
@ -4438,7 +4431,7 @@ int main() {
|
|||
wctype()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:4442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:4435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
|
@ -4457,7 +4450,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
|||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
|
||||
echo "configure:4461: checking for wctype in -lw" >&5
|
||||
echo "configure:4454: checking for wctype in -lw" >&5
|
||||
ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -4465,7 +4458,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lw $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4469 "configure"
|
||||
#line 4462 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
|
@ -4476,7 +4469,7 @@ int main() {
|
|||
wctype()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:4480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:4473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
|
@ -4508,12 +4501,12 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
|
||||
echo "configure:4512: checking for long long support in compiler" >&5
|
||||
echo "configure:4505: checking for long long support in compiler" >&5
|
||||
if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4517 "configure"
|
||||
#line 4510 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
|
@ -4523,7 +4516,7 @@ int main() {
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:4527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:4520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
gdb_cv_c_long_long=yes
|
||||
else
|
||||
|
@ -4545,7 +4538,7 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
|
||||
echo "configure:4549: checking for long long support in printf" >&5
|
||||
echo "configure:4542: checking for long long support in printf" >&5
|
||||
if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -4553,7 +4546,7 @@ else
|
|||
gdb_cv_printf_has_long_long=no
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4557 "configure"
|
||||
#line 4550 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main () {
|
||||
|
@ -4567,7 +4560,7 @@ int main () {
|
|||
return (strcmp ("0x0123456789abcdef", buf));
|
||||
}
|
||||
EOF
|
||||
if { (eval echo configure:4571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:4564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
gdb_cv_printf_has_long_long=yes
|
||||
else
|
||||
|
@ -4591,19 +4584,19 @@ echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
|
|||
|
||||
|
||||
echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
|
||||
echo "configure:4595: checking for long double support in compiler" >&5
|
||||
echo "configure:4588: checking for long double support in compiler" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4600 "configure"
|
||||
#line 4593 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
long double foo;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:4607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:4600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_long_double=yes
|
||||
else
|
||||
|
@ -4625,7 +4618,7 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
|
||||
echo "configure:4629: checking for long double support in printf" >&5
|
||||
echo "configure:4622: checking for long double support in printf" >&5
|
||||
if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -4633,7 +4626,7 @@ else
|
|||
gdb_cv_printf_has_long_double=no
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4637 "configure"
|
||||
#line 4630 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main () {
|
||||
|
@ -4643,7 +4636,7 @@ int main () {
|
|||
return (strncmp ("3.14159", buf, 7));
|
||||
}
|
||||
EOF
|
||||
if { (eval echo configure:4647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:4640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
gdb_cv_printf_has_long_double=yes
|
||||
else
|
||||
|
@ -4667,7 +4660,7 @@ echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
|
|||
|
||||
|
||||
echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
|
||||
echo "configure:4671: checking for long double support in scanf" >&5
|
||||
echo "configure:4664: checking for long double support in scanf" >&5
|
||||
if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -4675,7 +4668,7 @@ else
|
|||
gdb_cv_scanf_has_long_double=no
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4679 "configure"
|
||||
#line 4672 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main () {
|
||||
|
@ -4685,7 +4678,7 @@ int main () {
|
|||
return !(f > 3.14159 && f < 3.14160);
|
||||
}
|
||||
EOF
|
||||
if { (eval echo configure:4689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:4682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
gdb_cv_scanf_has_long_double=yes
|
||||
else
|
||||
|
@ -4711,17 +4704,17 @@ for ac_hdr in unistd.h
|
|||
do
|
||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||
echo "configure:4715: checking for $ac_hdr" >&5
|
||||
echo "configure:4708: checking for $ac_hdr" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4720 "configure"
|
||||
#line 4713 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:4725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:4718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -4750,12 +4743,12 @@ done
|
|||
for ac_func in getpagesize
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:4754: checking for $ac_func" >&5
|
||||
echo "configure:4747: checking for $ac_func" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4759 "configure"
|
||||
#line 4752 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
|
@ -4778,7 +4771,7 @@ $ac_func();
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:4782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:4775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=yes"
|
||||
else
|
||||
|
@ -4803,7 +4796,7 @@ fi
|
|||
done
|
||||
|
||||
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
|
||||
echo "configure:4807: checking for working mmap" >&5
|
||||
echo "configure:4800: checking for working mmap" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -4811,7 +4804,7 @@ else
|
|||
ac_cv_func_mmap_fixed_mapped=no
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4815 "configure"
|
||||
#line 4808 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
/* Thanks to Mike Haertel and Jim Avera for this test.
|
||||
|
@ -4951,7 +4944,7 @@ main()
|
|||
}
|
||||
|
||||
EOF
|
||||
if { (eval echo configure:4955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:4948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
ac_cv_func_mmap_fixed_mapped=yes
|
||||
else
|
||||
|
@ -4980,7 +4973,7 @@ if test ${build} = ${host} -a ${host} = ${target} ; then
|
|||
case ${host_os} in
|
||||
hpux*)
|
||||
echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
|
||||
echo "configure:4984: checking for HPUX/OSF thread support" >&5
|
||||
echo "configure:4977: checking for HPUX/OSF thread support" >&5
|
||||
if test -f /usr/include/dce/cma_config.h ; then
|
||||
if test "$GCC" = "yes" ; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
|
@ -4999,7 +4992,7 @@ EOF
|
|||
;;
|
||||
solaris*)
|
||||
echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
|
||||
echo "configure:5003: checking for Solaris thread debugging library" >&5
|
||||
echo "configure:4996: checking for Solaris thread debugging library" >&5
|
||||
if test -f /usr/lib/libthread_db.so.1 ; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
cat >> confdefs.h <<\EOF
|
||||
|
@ -5009,7 +5002,7 @@ EOF
|
|||
CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
|
||||
CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
|
||||
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
|
||||
echo "configure:5013: checking for dlopen in -ldl" >&5
|
||||
echo "configure:5006: checking for dlopen in -ldl" >&5
|
||||
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -5017,7 +5010,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-ldl $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 5021 "configure"
|
||||
#line 5014 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
|
@ -5028,7 +5021,7 @@ int main() {
|
|||
dlopen()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:5032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:5025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
|
@ -5060,17 +5053,17 @@ fi
|
|||
# all symbols visible in the dynamic symbol table.
|
||||
hold_ldflags=$LDFLAGS
|
||||
echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
|
||||
echo "configure:5064: checking for the ld -export-dynamic flag" >&5
|
||||
echo "configure:5057: checking for the ld -export-dynamic flag" >&5
|
||||
LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 5067 "configure"
|
||||
#line 5060 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
int i;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:5074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:5067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
found=yes
|
||||
else
|
||||
|
@ -5089,13 +5082,13 @@ rm -f conftest*
|
|||
# Sun randomly tweaked the prototypes in <proc_service.h>
|
||||
# at one point.
|
||||
echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
|
||||
echo "configure:5093: checking if <proc_service.h> is old" >&5
|
||||
echo "configure:5086: checking if <proc_service.h> is old" >&5
|
||||
if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 5099 "configure"
|
||||
#line 5092 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <proc_service.h>
|
||||
|
@ -5106,7 +5099,7 @@ int main() {
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:5110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:5103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
gdb_cv_proc_service_is_old=no
|
||||
else
|
||||
|
@ -5252,12 +5245,12 @@ fi
|
|||
|
||||
# In the Cygwin environment, we need some additional flags.
|
||||
echo $ac_n "checking for cygwin""... $ac_c" 1>&6
|
||||
echo "configure:5379: checking for cygwin" >&5
|
||||
echo "configure:5372: checking for cygwin" >&5
|
||||
if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 5384 "configure"
|
||||
#line 5377 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if defined (__CYGWIN__) || defined (__CYGWIN32__)
|
||||
|
@ -5291,7 +5284,7 @@ if test x$gdb_cv_os_cygwin = xyes; then
|
|||
else
|
||||
TERM_LIB=
|
||||
echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
|
||||
echo "configure:5418: checking for tgetent in -lncurses" >&5
|
||||
echo "configure:5411: checking for tgetent in -lncurses" >&5
|
||||
ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -5299,7 +5292,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lncurses $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 5426 "configure"
|
||||
#line 5419 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
|
@ -5310,7 +5303,7 @@ int main() {
|
|||
tgetent()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:5437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:5430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
|
@ -5329,7 +5322,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
|||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6
|
||||
echo "configure:5456: checking for tgetent in -lHcurses" >&5
|
||||
echo "configure:5449: checking for tgetent in -lHcurses" >&5
|
||||
ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -5337,7 +5330,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lHcurses $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 5464 "configure"
|
||||
#line 5457 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
|
@ -5348,7 +5341,7 @@ int main() {
|
|||
tgetent()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:5475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:5468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
|
@ -5367,7 +5360,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
|||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6
|
||||
echo "configure:5494: checking for tgetent in -ltermlib" >&5
|
||||
echo "configure:5487: checking for tgetent in -ltermlib" >&5
|
||||
ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -5375,7 +5368,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-ltermlib $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 5502 "configure"
|
||||
#line 5495 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
|
@ -5386,7 +5379,7 @@ int main() {
|
|||
tgetent()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:5513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:5506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
|
@ -5405,7 +5398,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
|||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
|
||||
echo "configure:5532: checking for tgetent in -ltermcap" >&5
|
||||
echo "configure:5525: checking for tgetent in -ltermcap" >&5
|
||||
ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -5413,7 +5406,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-ltermcap $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 5540 "configure"
|
||||
#line 5533 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
|
@ -5424,7 +5417,7 @@ int main() {
|
|||
tgetent()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:5551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:5544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
|
@ -5443,7 +5436,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
|||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
|
||||
echo "configure:5570: checking for tgetent in -lcurses" >&5
|
||||
echo "configure:5563: checking for tgetent in -lcurses" >&5
|
||||
ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -5451,7 +5444,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lcurses $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 5578 "configure"
|
||||
#line 5571 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
|
@ -5462,7 +5455,7 @@ int main() {
|
|||
tgetent()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:5589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:5582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
|
@ -5481,7 +5474,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
|||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6
|
||||
echo "configure:5608: checking for tgetent in -lterminfo" >&5
|
||||
echo "configure:5601: checking for tgetent in -lterminfo" >&5
|
||||
ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -5489,7 +5482,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lterminfo $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 5616 "configure"
|
||||
#line 5609 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
|
@ -5500,7 +5493,7 @@ int main() {
|
|||
tgetent()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:5627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:5620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
|
@ -5552,7 +5545,7 @@ fi
|
|||
# Uses ac_ vars as temps to allow command line to override cache and checks.
|
||||
# --without-x overrides everything else, but does not touch the cache.
|
||||
echo $ac_n "checking for X""... $ac_c" 1>&6
|
||||
echo "configure:6763: checking for X" >&5
|
||||
echo "configure:6756: checking for X" >&5
|
||||
|
||||
# Check whether --with-x or --without-x was given.
|
||||
if test "${with_x+set}" = set; then
|
||||
|
@ -5614,12 +5607,12 @@ if test "$ac_x_includes" = NO; then
|
|||
|
||||
# First, try using that file with no special directory specified.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 6825 "configure"
|
||||
#line 6818 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$x_direct_test_include>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:6830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:6823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
@ -5688,14 +5681,14 @@ if test "$ac_x_libraries" = NO; then
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-l$x_direct_test_library $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 6899 "configure"
|
||||
#line 6892 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
${x_direct_test_function}()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:6906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:6899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
LIBS="$ac_save_LIBS"
|
||||
# We can link X programs with no special library path.
|
||||
|
@ -5975,12 +5968,12 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
|
||||
echo "configure:7257: checking for Cygwin environment" >&5
|
||||
echo "configure:7250: checking for Cygwin environment" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 7262 "configure"
|
||||
#line 7255 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
|
@ -5991,7 +5984,7 @@ int main() {
|
|||
return __CYGWIN__;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:7273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:7266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_cygwin=yes
|
||||
else
|
||||
|
@ -6008,19 +6001,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6
|
|||
CYGWIN=
|
||||
test "$ac_cv_cygwin" = yes && CYGWIN=yes
|
||||
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
|
||||
echo "configure:7290: checking for mingw32 environment" >&5
|
||||
echo "configure:7283: checking for mingw32 environment" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 7295 "configure"
|
||||
#line 7288 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
return __MINGW32__;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:7302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:7295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_mingw32=yes
|
||||
else
|
||||
|
@ -6039,7 +6032,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes
|
|||
|
||||
|
||||
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
|
||||
echo "configure:7321: checking for executable suffix" >&5
|
||||
echo "configure:7314: checking for executable suffix" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -6049,7 +6042,7 @@ else
|
|||
rm -f conftest*
|
||||
echo 'int main () { return 0; }' > conftest.$ac_ext
|
||||
ac_cv_exeext=
|
||||
if { (eval echo configure:7331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||
if { (eval echo configure:7324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||
for file in conftest.*; do
|
||||
case $file in
|
||||
*.c | *.o | *.obj) ;;
|
||||
|
|
|
@ -144,33 +144,24 @@ AC_MSG_RESULT($gdb_cv_hpux_sswide)
|
|||
|
||||
# If we are configured native on GNU/Linux, work around problems with
|
||||
# sys/procfs.h
|
||||
# Also detect which type of /proc is in use, such as for Unixware.
|
||||
# Also detect which type of /proc is in use, such as for Unixware or Solaris.
|
||||
|
||||
if test "${target}" = "${host}"; then
|
||||
gdb_cv_hostos_is_solaris=no
|
||||
case "${host}" in
|
||||
i[[3456]]86-*-linux*)
|
||||
AC_DEFINE(START_INFERIOR_TRAPS_EXPECTED,2)
|
||||
AC_DEFINE(sys_quotactl)
|
||||
;;
|
||||
*-*-solaris*)
|
||||
gdb_cv_hostos_is_solaris=yes ;;
|
||||
*-*-unixware* | *-*-sysv4.2uw2.* | *-*-sysv4.2uw7.*)
|
||||
AC_DEFINE(NEW_PROC_API)
|
||||
;;
|
||||
# FIXME: we would like to define NEW_PROC_API for all versions of
|
||||
# Solaris from 2.6 on... but it isn't quite working yet. Seems
|
||||
# to work on sparc 2.6, so let's try it out there.
|
||||
sparc-sun-solaris2.6)
|
||||
AC_DEFINE(NEW_PROC_API)
|
||||
;;
|
||||
esac
|
||||
AC_MSG_CHECKING(for directory proc entries)
|
||||
# The [gdb_host != sun4sol2] hack is because Solaris does provide the
|
||||
# multiple procfs files as of Solaris 2.6, but GDB can't use it right now.
|
||||
if test "$ac_cv_header_sys_procfs_h" = yes -a \
|
||||
"$gdb_cv_hostos_is_solaris" = no \
|
||||
-a -d /proc/$$ \
|
||||
-a -f /proc/$$/ctl \
|
||||
-a -f /proc/$$/as \
|
||||
-a -f /proc/$$/map \
|
||||
-a -f /proc/$$/status; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_MULTIPLE_PROC_FDS)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$ac_cv_header_sys_procfs_h" = yes; then
|
||||
|
|
|
@ -2379,6 +2379,13 @@ process_one_symbol (type, desc, valu, name, section_offsets, objfile)
|
|||
function_start_offset = valu;
|
||||
|
||||
within_function = 1;
|
||||
|
||||
if (context_stack_depth > 1)
|
||||
{
|
||||
complain (&lbrac_unmatched_complaint, symnum);
|
||||
break;
|
||||
}
|
||||
|
||||
if (context_stack_depth > 0)
|
||||
{
|
||||
new = pop_context ();
|
||||
|
@ -2386,9 +2393,6 @@ process_one_symbol (type, desc, valu, name, section_offsets, objfile)
|
|||
finish_block (new->name, &local_symbols, new->old_blocks,
|
||||
new->start_addr, valu, objfile);
|
||||
}
|
||||
/* Stack must be empty now. */
|
||||
if (context_stack_depth != 0)
|
||||
complain (&lbrac_unmatched_complaint, symnum);
|
||||
|
||||
new = push_context (0, valu);
|
||||
new->name = define_symbol (valu, name, desc, type, objfile);
|
||||
|
|
|
@ -1341,4 +1341,9 @@ enum gdb_rc {
|
|||
function will ``print'' the object on ``output''). */
|
||||
enum gdb_rc gdb_breakpoint_query (/* struct {ui,gdb}_out *output, */ int bnum);
|
||||
|
||||
/* Create a breakpoint at ADDRESS (a GDB source and line). */
|
||||
enum gdb_rc gdb_breakpoint (char *address, char *condition,
|
||||
int hardwareflag, int tempflag,
|
||||
int thread, int ignore_count);
|
||||
|
||||
#endif /* #ifndef DEFS_H */
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2000-01-05 Dmitry Sivachenko <dima@Chg.RU>
|
||||
|
||||
* gdb.texinfo: Wrap "ASCII" in @sc{}; clarify a few sentences.
|
||||
|
||||
Wed Dec 8 19:53:08 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* gdbint.texinfo (FRAME_CHAIN_VALID): Add the generic frame-chain
|
||||
|
|
|
@ -4345,7 +4345,7 @@ $1 = @{0x1234, 0x5678@}
|
|||
@end example
|
||||
|
||||
As a convenience, if you leave the array length out (as in
|
||||
@samp{(@var{type}[])@var{value}}) gdb calculates the size to fill
|
||||
@samp{(@var{type}[])@var{value}}) @value{GDBN} calculates the size to fill
|
||||
the value (as @samp{sizeof(@var{value})/sizeof(@var{type})}:
|
||||
@example
|
||||
(@value{GDBP}) p/x (short[])0x12345678
|
||||
|
@ -5621,8 +5621,8 @@ each language.
|
|||
@itemx set check range off
|
||||
Set range checking on or off, overriding the default setting for the
|
||||
current working language. A warning is issued if the setting does not
|
||||
match the language default. If a range error occurs, then a message
|
||||
is printed and evaluation of the expression is aborted.
|
||||
match the language default. If a range error occurs and range checking is on,
|
||||
then a message is printed and evaluation of the expression is aborted.
|
||||
|
||||
@item set check range warn
|
||||
Output messages when the @value{GDBN} range checker detects a range error,
|
||||
|
@ -6373,13 +6373,13 @@ Returns the absolute value of @var{n}.
|
|||
|
||||
@item CAP(@var{c})
|
||||
If @var{c} is a lower case letter, it returns its upper case
|
||||
equivalent, otherwise it returns its argument
|
||||
equivalent, otherwise it returns its argument.
|
||||
|
||||
@item CHR(@var{i})
|
||||
Returns the character whose ordinal value is @var{i}.
|
||||
|
||||
@item DEC(@var{v})
|
||||
Decrements the value in the variable @var{v}. Returns the new value.
|
||||
Decrements the value in the variable @var{v} by one. Returns the new value.
|
||||
|
||||
@item DEC(@var{v},@var{i})
|
||||
Decrements the value in the variable @var{v} by @var{i}. Returns the
|
||||
|
@ -6396,7 +6396,7 @@ Returns the floating point equivalent of the integer @var{i}.
|
|||
Returns the index of the last member of @var{a}.
|
||||
|
||||
@item INC(@var{v})
|
||||
Increments the value in the variable @var{v}. Returns the new value.
|
||||
Increments the value in the variable @var{v} by one. Returns the new value.
|
||||
|
||||
@item INC(@var{v},@var{i})
|
||||
Increments the value in the variable @var{v} by @var{i}. Returns the
|
||||
|
@ -6417,8 +6417,8 @@ Returns boolean TRUE if @var{i} is an odd number.
|
|||
|
||||
@item ORD(@var{x})
|
||||
Returns the ordinal value of its argument. For example, the ordinal
|
||||
value of a character is its ASCII value (on machines supporting the
|
||||
ASCII character set). @var{x} must be of an ordered type, which include
|
||||
value of a character is its @sc{ascii} value (on machines supporting the
|
||||
@sc{ascii} character set). @var{x} must be of an ordered type, which include
|
||||
integral, character and enumerated types.
|
||||
|
||||
@item SIZE(@var{x})
|
||||
|
@ -6463,7 +6463,7 @@ digits.
|
|||
@item
|
||||
Character constants consist of a single character enclosed by a pair of
|
||||
like quotes, either single (@code{'}) or double (@code{"}). They may
|
||||
also be expressed by their ordinal value (their ASCII value, usually)
|
||||
also be expressed by their ordinal value (their @sc{ascii} value, usually)
|
||||
followed by a @samp{C}.
|
||||
|
||||
@item
|
||||
|
@ -6790,7 +6790,7 @@ set result := EXPR
|
|||
|
||||
@noindent
|
||||
This does the same as the Chill action @code{RESULT EXPR} (which
|
||||
is not available in gdb).
|
||||
is not available in @value{GDBN}).
|
||||
|
||||
Values of reference mode locations are printed by @code{PTR(<hex
|
||||
value>)} in case of a free reference mode, and by @code{(REF <reference
|
||||
|
@ -8684,7 +8684,7 @@ otherwise noted all numbers are represented in HEX with leading zeros
|
|||
suppressed.
|
||||
|
||||
Response @var{data} can be run-length encoded to save space. A @samp{*}
|
||||
means that the next character is an ASCII encoding giving a repeat count
|
||||
means that the next character is an @sc{ascii} encoding giving a repeat count
|
||||
which stands for that many repetitions of the character preceding the
|
||||
@samp{*}. The encoding is @code{n+29}, yielding a printable character
|
||||
where @code{n >=3} (which is where rle starts to win). The printable
|
||||
|
@ -9179,7 +9179,7 @@ host debugger.}
|
|||
|
||||
@item @code{O}@var{XX...}
|
||||
@tab
|
||||
@var{XX...} is hex encoding of ASCII data. This can happen at any time
|
||||
@var{XX...} is hex encoding of @sc{ascii} data. This can happen at any time
|
||||
while the program is running and the debugger should continue to wait
|
||||
for 'W', 'T', etc.
|
||||
|
||||
|
|
28
gdb/infrun.c
28
gdb/infrun.c
|
@ -92,17 +92,7 @@ int sync_execution = 0;
|
|||
when the inferior stopped in a different thread than it had been
|
||||
running in. */
|
||||
|
||||
static int switched_from_inferior_pid;
|
||||
|
||||
/* This will be true for configurations that may actually report an
|
||||
inferior pid different from the original. At present this is only
|
||||
true for HP-UX native. */
|
||||
|
||||
#ifndef MAY_SWITCH_FROM_INFERIOR_PID
|
||||
#define MAY_SWITCH_FROM_INFERIOR_PID (0)
|
||||
#endif
|
||||
|
||||
static int may_switch_from_inferior_pid = MAY_SWITCH_FROM_INFERIOR_PID;
|
||||
static int previous_inferior_pid;
|
||||
|
||||
/* This is true for configurations that may follow through execl() and
|
||||
similar functions. At present this is only true for HP-UX native. */
|
||||
|
@ -1250,8 +1240,7 @@ wait_for_inferior (void)
|
|||
thread_step_needed = 0;
|
||||
|
||||
/* We'll update this if & when we switch to a new thread. */
|
||||
if (may_switch_from_inferior_pid)
|
||||
switched_from_inferior_pid = inferior_pid;
|
||||
previous_inferior_pid = inferior_pid;
|
||||
|
||||
overlay_cache_invalid = 1;
|
||||
|
||||
|
@ -1312,8 +1301,7 @@ fetch_inferior_event (client_data)
|
|||
thread_step_needed = 0;
|
||||
|
||||
/* We'll update this if & when we switch to a new thread. */
|
||||
if (may_switch_from_inferior_pid)
|
||||
switched_from_inferior_pid = inferior_pid;
|
||||
previous_inferior_pid = inferior_pid;
|
||||
|
||||
overlay_cache_invalid = 1;
|
||||
|
||||
|
@ -1944,15 +1932,12 @@ handle_inferior_event (struct execution_control_state *ecs)
|
|||
&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;
|
||||
|
||||
if (context_hook)
|
||||
context_hook (pid_to_thread_id (ecs->pid));
|
||||
|
||||
printf_filtered ("[Switching to %s]\n", target_pid_to_str (ecs->pid));
|
||||
flush_cached_frames ();
|
||||
}
|
||||
|
||||
|
@ -3300,14 +3285,13 @@ normal_stop (void)
|
|||
|
||||
(Note that there's no point in saying anything if the inferior
|
||||
has exited!) */
|
||||
if (may_switch_from_inferior_pid
|
||||
&& (switched_from_inferior_pid != inferior_pid)
|
||||
if ((previous_inferior_pid != inferior_pid)
|
||||
&& target_has_execution)
|
||||
{
|
||||
target_terminal_ours_for_output ();
|
||||
printf_filtered ("[Switched to %s]\n",
|
||||
printf_filtered ("[Switching to %s]\n",
|
||||
target_pid_or_tid_to_str (inferior_pid));
|
||||
switched_from_inferior_pid = inferior_pid;
|
||||
previous_inferior_pid = inferior_pid;
|
||||
}
|
||||
|
||||
/* Make sure that the current_frame's pc is correct. This
|
||||
|
|
784
gdb/proc_api.c
Executable file
784
gdb/proc_api.c
Executable file
|
@ -0,0 +1,784 @@
|
|||
/*
|
||||
* Pretty-print trace of api calls to the /proc api
|
||||
* (ioctl or read/write calls).
|
||||
*
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
#include "gdbcmd.h"
|
||||
|
||||
#if defined (NEW_PROC_API)
|
||||
#define _STRUCTURED_PROC 1
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/procfs.h>
|
||||
#include <sys/proc.h> /* for struct proc */
|
||||
#include <sys/user.h> /* for struct user */
|
||||
#include <fcntl.h> /* for O_RDWR etc. */
|
||||
|
||||
/* Much of the information used in the /proc interface, particularly for
|
||||
printing status information, is kept as tables of structures of the
|
||||
following form. These tables can be used to map numeric values to
|
||||
their symbolic names and to a string that describes their specific use. */
|
||||
|
||||
struct trans {
|
||||
long value; /* The numeric value */
|
||||
char *name; /* The equivalent symbolic value */
|
||||
char *desc; /* Short description of value */
|
||||
};
|
||||
|
||||
static int procfs_trace = 1;
|
||||
/*static int info_verbose = 1;*/ /* kludge */
|
||||
static FILE *procfs_file = NULL;
|
||||
static char *procfs_filename = "procfs_trace";
|
||||
|
||||
static void
|
||||
set_procfs_trace_cmd (args, from_tty, c)
|
||||
char *args;
|
||||
int from_tty;
|
||||
struct cmd_list_element *c;
|
||||
{
|
||||
#if 0 /* not sure what I might actually need to do here, if anything */
|
||||
if (procfs_file)
|
||||
fflush (procfs_file);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
set_procfs_file_cmd (args, from_tty, c)
|
||||
char *args;
|
||||
int from_tty;
|
||||
struct cmd_list_element *c;
|
||||
{
|
||||
/* Just changed the filename for procfs tracing.
|
||||
If a file was already open, close it. */
|
||||
if (procfs_file)
|
||||
fclose (procfs_file);
|
||||
procfs_file = NULL;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NEW_PROC_API
|
||||
|
||||
static struct trans ioctl_table[] = {
|
||||
#ifdef PIOCACINFO /* irix */
|
||||
{ PIOCACINFO, "PIOCACINFO", "get process account info" },
|
||||
#endif
|
||||
{ PIOCACTION, "PIOCACTION", "get signal action structs" },
|
||||
#ifdef PIOCARGUMENTS /* osf */
|
||||
{ PIOCARGUMENTS, "PIOCARGUMENTS", "command line args" },
|
||||
#endif
|
||||
#ifdef PIOCAUXV /* solaris aux vectors */
|
||||
{ PIOCAUXV, "PIOCAUXV", "get aux vector" },
|
||||
{ PIOCNAUXV, "PIOCNAUXV", "get number of aux vector entries" },
|
||||
#endif /* AUXV */
|
||||
{ PIOCCFAULT, "PIOCCFAULT", "clear current fault" },
|
||||
{ PIOCCRED, "PIOCCRED", "get process credentials" },
|
||||
#ifdef PIOCENEVCTRS /* irix event counters */
|
||||
{ PIOCENEVCTRS, "PIOCENEVCTRS", "acquire and start event counters" },
|
||||
{ PIOCGETEVCTRL, "PIOCGETEVCTRL", "get control info of event counters" },
|
||||
{ PIOCGETEVCTRS, "PIOCGETEVCTRS", "dump event counters" },
|
||||
{ PIOCGETPREVCTRS, "PIOCGETPREVCTRS", "dump event counters & prusage info" },
|
||||
{ PIOCRELEVCTRS, "PIOCRELEVCTRS", "release/stop event counters" },
|
||||
{ PIOCSETEVCTRL, "PIOCSETEVCTRL", "set control info of event counters" },
|
||||
{ PIOCGETPTIMER, "PIOCGETPTIMER", "get process timers" },
|
||||
#endif /* irix event counters */
|
||||
{ PIOCGENTRY, "PIOCGENTRY", "get traced syscall entry set" },
|
||||
{ PIOCGETPR, "PIOCGETPR", "read struct proc" },
|
||||
{ PIOCGETU, "PIOCGETU", "read user area" },
|
||||
#if defined (PIOCGETUTK) && (defined(KERNEL) || defined(SHOW_UTT)) /* osf */
|
||||
{ PIOCGETUTK, "PIOCGETUTK", "get the utask struct" },
|
||||
#endif
|
||||
{ PIOCGEXIT, "PIOCGEXIT", "get traced syscall exit set" },
|
||||
{ PIOCGFAULT, "PIOCGFAULT", "get traced fault set" },
|
||||
#ifdef PIOCGFPCR /* osf */
|
||||
{ PIOCGFPCR, "PIOCGFPCR", "get FP control register" },
|
||||
{ PIOCSFPCR, "PIOCSFPCR", "set FP conrtol register" },
|
||||
#endif
|
||||
{ PIOCGFPREG, "PIOCGFPREG", "get floating point registers" },
|
||||
{ PIOCGHOLD, "PIOCGHOLD", "get held signal set" },
|
||||
{ PIOCGREG, "PIOCGREG", "get general registers" },
|
||||
{ PIOCGROUPS, "PIOCGROUPS", "get supplementary groups" },
|
||||
#ifdef PIOCGSPCACT /* osf */
|
||||
{ PIOCGSPCACT, "PIOCGSPCACT", "get special action" },
|
||||
{ PIOCSSPCACT, "PIOCSSPCACT", "set special action" },
|
||||
#endif
|
||||
{ PIOCGTRACE, "PIOCGTRACE", "get traced signal set" },
|
||||
#ifdef PIOCGWATCH /* irix watchpoints */
|
||||
{ PIOCGWATCH, "PIOCGWATCH", "get watchpoint" },
|
||||
{ PIOCSWATCH, "PIOCSWATCH", "set watchpoint" },
|
||||
{ PIOCNWATCH, "PIOCNWATCH", "get number of watchpoints" },
|
||||
#endif /* irix watchpoints */
|
||||
#ifdef PIOCGWIN /* solaris sparc */
|
||||
{ PIOCGWIN, "PIOCGWIN", "get gwindows_t" },
|
||||
#endif
|
||||
#ifdef PIOCGXREG /* solaris sparc extra regs */
|
||||
{ PIOCGXREGSIZE, "PIOCXREGSIZE", "get extra register state size" },
|
||||
{ PIOCGXREG, "PIOCGXREG", "get extra register state" },
|
||||
{ PIOCSXREG, "PIOCSXREG", "set extra register state" },
|
||||
#endif /* XREG */
|
||||
{ PIOCKILL, "PIOCKILL", "send signal" },
|
||||
#ifdef PIOCLDT /* solaris i386 */
|
||||
{ PIOCLDT, "PIOCLDT", "get LDT" },
|
||||
{ PIOCNLDT, "PIOCNLDT", "get number of LDT entries" },
|
||||
#endif
|
||||
#ifdef PIOCLSTATUS /* solaris and unixware */
|
||||
{ PIOCLSTATUS, "PIOCLSTATUS", "get status of all lwps" },
|
||||
{ PIOCLUSAGE, "PIOCLUSAGE", "get resource usage of all lwps" },
|
||||
{ PIOCOPENLWP, "PIOCOPENLWP", "get lwp file descriptor" },
|
||||
{ PIOCLWPIDS, "PIOCLWPIDS", "get lwp identifiers" },
|
||||
#endif /* LWP */
|
||||
{ PIOCMAP, "PIOCMAP", "get memory map information" },
|
||||
{ PIOCMAXSIG, "PIOCMAXSIG", "get max signal number" },
|
||||
{ PIOCNICE, "PIOCNICE", "set nice priority" },
|
||||
{ PIOCNMAP, "PIOCNMAP", "get number of memory mappings" },
|
||||
{ PIOCOPENM, "PIOCOPENM", "open mapped object for reading" },
|
||||
#ifdef PIOCOPENMOBS /* osf */
|
||||
{ PIOCOPENMOBS, "PIOCOPENMOBS", "open mapped object" },
|
||||
#endif
|
||||
#ifdef PIOCOPENPD /* solaris */
|
||||
{ PIOCOPENPD, "PIOCOPENPD", "get page data file descriptor" },
|
||||
#endif
|
||||
{ PIOCPSINFO, "PIOCPSINFO", "get ps(1) information" },
|
||||
{ PIOCRESET, "PIOCRESET", "reset process flags" },
|
||||
{ PIOCRFORK, "PIOCRFORK", "reset inherit-on-fork flag" },
|
||||
{ PIOCRRLC, "PIOCRRLC", "reset run-on-last-close flag" },
|
||||
{ PIOCRUN, "PIOCRUN", "make process runnable" },
|
||||
#ifdef PIOCSAVECCNTRS /* irix */
|
||||
{ PIOCSAVECCNTRS, "PIOCSAVECCNTRS", "parent gets child cntrs" },
|
||||
#endif
|
||||
{ PIOCSENTRY, "PIOCSENTRY", "set traced syscall entry set" },
|
||||
{ PIOCSET, "PIOCSET", "set process flags" },
|
||||
{ PIOCSEXIT, "PIOCSEXIT", "set traced syscall exit set" },
|
||||
{ PIOCSFAULT, "PIOCSFAULT", "set traced fault set" },
|
||||
{ PIOCSFORK, "PIOCSFORK", "set inherit-on-fork flag" },
|
||||
{ PIOCSFPREG, "PIOCSFPREG", "set floating point registers" },
|
||||
{ PIOCSHOLD, "PIOCSHOLD", "set held signal set" },
|
||||
{ PIOCSREG, "PIOCSREG", "set general registers" },
|
||||
{ PIOCSRLC, "PIOCSRLC", "set run-on-last-close flag" },
|
||||
{ PIOCSSIG, "PIOCSSIG", "set current signal" },
|
||||
{ PIOCSTATUS, "PIOCSTATUS", "get process status" },
|
||||
{ PIOCSTOP, "PIOCSTOP", "post stop request" },
|
||||
{ PIOCSTRACE, "PIOCSTRACE", "set traced signal set" },
|
||||
{ PIOCUNKILL, "PIOCUNKILL", "delete a signal" },
|
||||
#ifdef PIOCUSAGE /* solaris */
|
||||
{ PIOCUSAGE, "PIOCUSAGE", "get resource usage" },
|
||||
#endif
|
||||
{ PIOCWSTOP, "PIOCWSTOP", "wait for process to stop" },
|
||||
|
||||
#ifdef PIOCNTHR /* osf threads */
|
||||
{ PIOCNTHR, "PIOCNTHR", "get thread count" },
|
||||
{ PIOCRTINH, "PIOCRTINH", "reset inherit-on-thread-creation" },
|
||||
{ PIOCSTINH, "PIOCSTINH", "set inherit-on-thread-creation" },
|
||||
{ PIOCTLIST, "PIOCTLIST", "get thread ids" },
|
||||
{ PIOCXPTH, "PIOCXPTH", "translate port to thread handle" },
|
||||
{ PIOCTRUN, "PIOCTRUN", "make thread runnable" },
|
||||
{ PIOCTSTATUS, "PIOCTSTATUS", "get thread status" },
|
||||
{ PIOCTSTOP, "PIOCTSTOP", "stop a thread" },
|
||||
/* ... TGTRACE TSTRACE TSSIG TKILL TUNKILL TCFAULT TGFAULT TSFAULT
|
||||
TGFPREG TSFPREG TGREG TSREG TACTION TTERM TABRUN TGENTRY TSENTRY
|
||||
TGEXIT TSEXIT TSHOLD ... thread functions */
|
||||
#endif /* osf threads */
|
||||
{ -1, NULL, NULL }
|
||||
};
|
||||
|
||||
int
|
||||
ioctl_with_trace (fd, opcode, ptr, file, line)
|
||||
int fd;
|
||||
long opcode;
|
||||
void *ptr;
|
||||
char *file;
|
||||
int line;
|
||||
{
|
||||
int i, ret, arg1;
|
||||
|
||||
if (procfs_trace)
|
||||
{
|
||||
if (procfs_file == NULL && procfs_filename != NULL)
|
||||
procfs_file = fopen (procfs_filename, "a");
|
||||
|
||||
for (i = 0; ioctl_table[i].name != NULL; i++)
|
||||
if (ioctl_table[i].value == opcode)
|
||||
break;
|
||||
|
||||
if (info_verbose)
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"%s:%d -- ", file, line);
|
||||
switch (opcode) {
|
||||
case PIOCSET:
|
||||
arg1 = ptr ? *(long *) ptr : 0;
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"ioctl (PIOCSET, %s) %s\n",
|
||||
arg1 == PR_FORK ? "PR_FORK" :
|
||||
arg1 == PR_RLC ? "PR_RLC" :
|
||||
#ifdef PR_ASYNC
|
||||
arg1 == PR_ASYNC ? "PR_ASYNC" :
|
||||
#endif
|
||||
"<unknown flag>",
|
||||
info_verbose ? ioctl_table[i].desc : "");
|
||||
break;
|
||||
case PIOCRESET:
|
||||
arg1 = ptr ? *(long *) ptr : 0;
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"ioctl (PIOCRESET, %s) %s\n",
|
||||
arg1 == PR_FORK ? "PR_FORK" :
|
||||
arg1 == PR_RLC ? "PR_RLC" :
|
||||
#ifdef PR_ASYNC
|
||||
arg1 == PR_ASYNC ? "PR_ASYNC" :
|
||||
#endif
|
||||
"<unknown flag>",
|
||||
info_verbose ? ioctl_table[i].desc : "");
|
||||
break;
|
||||
case PIOCSTRACE:
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"ioctl (PIOCSTRACE) ");
|
||||
proc_prettyfprint_signalset (procfs_file ? procfs_file : stdout,
|
||||
(sigset_t *) ptr, 0);
|
||||
break;
|
||||
case PIOCSFAULT:
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"ioctl (%s) ",
|
||||
opcode == PIOCSFAULT ? "PIOCSFAULT" : "PIOCGFAULT");
|
||||
proc_prettyfprint_faultset (procfs_file ? procfs_file : stdout,
|
||||
(fltset_t *) ptr, 0);
|
||||
break;
|
||||
case PIOCSENTRY:
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"ioctl (%s) ",
|
||||
opcode == PIOCSENTRY ? "PIOCSENTRY" : "PIOCGENTRY");
|
||||
proc_prettyfprint_syscalls (procfs_file ? procfs_file : stdout,
|
||||
(sysset_t *) ptr, 0);
|
||||
break;
|
||||
case PIOCSEXIT:
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"ioctl (%s) ",
|
||||
opcode == PIOCSEXIT ? "PIOCSEXIT" : "PIOCGEXIT");
|
||||
proc_prettyfprint_syscalls (procfs_file ? procfs_file : stdout,
|
||||
(sysset_t *) ptr, 0);
|
||||
break;
|
||||
case PIOCSHOLD:
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"ioctl (%s) ",
|
||||
opcode == PIOCSHOLD ? "PIOCSHOLD" : "PIOCGHOLD");
|
||||
proc_prettyfprint_signalset (procfs_file ? procfs_file : stdout,
|
||||
(sigset_t *) ptr, 0);
|
||||
break;
|
||||
case PIOCSSIG:
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"ioctl (PIOCSSIG) ");
|
||||
proc_prettyfprint_signal (procfs_file ? procfs_file : stdout,
|
||||
ptr ? ((siginfo_t *) ptr)->si_signo : 0,
|
||||
0);
|
||||
fprintf (procfs_file ? procfs_file : stdout, "\n");
|
||||
break;
|
||||
case PIOCRUN:
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"ioctl (PIOCRUN) ");
|
||||
|
||||
arg1 = ptr ? *(long *) ptr : 0;
|
||||
if (arg1 & PRCSIG)
|
||||
fprintf (procfs_file ? procfs_file : stdout, "clearSig ");
|
||||
if (arg1 & PRCFAULT)
|
||||
fprintf (procfs_file ? procfs_file : stdout, "clearFlt ");
|
||||
if (arg1 & PRSTRACE)
|
||||
fprintf (procfs_file ? procfs_file : stdout, "setTrace ");
|
||||
if (arg1 & PRSHOLD)
|
||||
fprintf (procfs_file ? procfs_file : stdout, "setHold ");
|
||||
if (arg1 & PRSFAULT)
|
||||
fprintf (procfs_file ? procfs_file : stdout, "setFlt ");
|
||||
if (arg1 & PRSVADDR)
|
||||
fprintf (procfs_file ? procfs_file : stdout, "setVaddr ");
|
||||
if (arg1 & PRSTEP)
|
||||
fprintf (procfs_file ? procfs_file : stdout, "step ");
|
||||
if (arg1 & PRSABORT)
|
||||
fprintf (procfs_file ? procfs_file : stdout, "syscallAbort ");
|
||||
if (arg1 & PRSTOP)
|
||||
fprintf (procfs_file ? procfs_file : stdout, "stopReq ");
|
||||
|
||||
fprintf (procfs_file ? procfs_file : stdout, "\n");
|
||||
break;
|
||||
case PIOCKILL:
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"ioctl (PIOCKILL) ");
|
||||
proc_prettyfprint_signal (procfs_file ? procfs_file : stdout,
|
||||
ptr ? *(long *) ptr : 0, 0);
|
||||
fprintf (procfs_file ? procfs_file : stdout, "\n");
|
||||
break;
|
||||
#ifdef PIOCSSPCACT
|
||||
case PIOCSSPCACT:
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"ioctl (PIOCSSPCACT) ");
|
||||
arg1 = ptr ? *(long *) ptr : 0;
|
||||
if (arg1 & PRFS_STOPFORK)
|
||||
fprintf (procfs_file ? procfs_file : stdout, "stopFork ");
|
||||
if (arg1 & PRFS_STOPEXEC)
|
||||
fprintf (procfs_file ? procfs_file : stdout, "stopExec ");
|
||||
if (arg1 & PRFS_STOPTERM)
|
||||
fprintf (procfs_file ? procfs_file : stdout, "stopTerm ");
|
||||
if (arg1 & PRFS_STOPTCR)
|
||||
fprintf (procfs_file ? procfs_file : stdout, "stopThreadCreate ");
|
||||
if (arg1 & PRFS_STOPTTERM)
|
||||
fprintf (procfs_file ? procfs_file : stdout, "stopThreadTerm ");
|
||||
if (arg1 & PRFS_KOLC)
|
||||
fprintf (procfs_file ? procfs_file : stdout, "killOnLastClose ");
|
||||
fprintf (procfs_file ? procfs_file : stdout, "\n");
|
||||
break;
|
||||
#endif /* PIOCSSPCACT */
|
||||
default:
|
||||
if (ioctl_table[i].name)
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"ioctl (%s) %s\n",
|
||||
ioctl_table[i].name,
|
||||
info_verbose ? ioctl_table[i].desc : "");
|
||||
else
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"ioctl (<unknown %ld (0x%lx)) \n", opcode, opcode);
|
||||
break;
|
||||
}
|
||||
if (procfs_file)
|
||||
fflush (procfs_file);
|
||||
}
|
||||
ret = ioctl (fd, opcode, ptr);
|
||||
if (procfs_trace && ret < 0)
|
||||
{
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"[ioctl (%s) FAILED!]\n",
|
||||
ioctl_table[i].name != NULL ?
|
||||
ioctl_table[i].name : "<unknown>");
|
||||
if (procfs_file)
|
||||
fflush (procfs_file);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#else /* NEW_PROC_API */
|
||||
|
||||
static struct trans rw_table[] = {
|
||||
#ifdef PCAGENT /* solaris */
|
||||
{ PCAGENT, "PCAGENT", "create agent lwp with regs from argument" },
|
||||
#endif
|
||||
{ PCCFAULT, "PCCFAULT", "clear current fault" },
|
||||
#ifdef PCCSIG /* solaris */
|
||||
{ PCCSIG, "PCCSIG", "clear current signal" },
|
||||
#endif
|
||||
{ PCDSTOP, "PCDSTOP", "post stop request" },
|
||||
{ PCKILL, "PCKILL", "post a signal" },
|
||||
{ PCNICE, "PCNICE", "set nice priority" },
|
||||
#ifdef PCREAD /* solaris */
|
||||
{ PCREAD, "PCREAD", "read from the address space" },
|
||||
{ PCWRITE, "PCWRITE", "write to the address space" },
|
||||
#endif
|
||||
#ifdef PCRESET /* unixware */
|
||||
{ PCRESET, "PCRESET", "unset modes" },
|
||||
#endif
|
||||
{ PCRUN, "PCRUN", "make process/lwp runnable" },
|
||||
#ifdef PCSASRS /* solaris 2.7 only */
|
||||
{ PCSASRS, "PCSASRS", "set ancillary state registers" },
|
||||
#endif
|
||||
#ifdef PCSCRED /* solaris */
|
||||
{ PCSCRED, "PCSCRED", "set process credentials" },
|
||||
#endif
|
||||
{ PCSENTRY, "PCSENTRY", "set traced syscall entry set" },
|
||||
{ PCSET, "PCSET", "set modes" },
|
||||
{ PCSEXIT, "PCSEXIT", "set traced syscall exit set" },
|
||||
{ PCSFAULT, "PCSFAULT", "set traced fault set" },
|
||||
{ PCSFPREG, "PCSFPREG", "set floating point registers" },
|
||||
{ PCSHOLD, "PCSHOLD", "set signal mask" },
|
||||
{ PCSREG, "PCSREG", "set general registers" },
|
||||
{ PCSSIG, "PCSSIG", "set current signal" },
|
||||
{ PCSTOP, "PCSTOP", "post stop request and wait" },
|
||||
{ PCSTRACE, "PCSTRACE", "set traced signal set" },
|
||||
#ifdef PCSVADDR /* solaris */
|
||||
{ PCSVADDR, "PCSVADDR", "set pc virtual address" },
|
||||
#endif
|
||||
#ifdef PCSXREG /* solaris sparc only */
|
||||
{ PCSXREG, "PCSXREG", "set extra registers" },
|
||||
#endif
|
||||
#ifdef PCTWSTOP /* solaris */
|
||||
{ PCTWSTOP, "PCTWSTOP", "wait for stop, with timeout arg" },
|
||||
#endif
|
||||
{ PCUNKILL, "PCUNKILL", "delete a pending signal" },
|
||||
#ifdef PCUNSET /* solaris */
|
||||
{ PCUNSET, "PCUNSET", "unset modes" },
|
||||
#endif
|
||||
#ifdef PCWATCH /* solaris */
|
||||
{ PCWATCH, "PCWATCH", "set/unset watched memory area" },
|
||||
#endif
|
||||
{ PCWSTOP, "PCWSTOP", "wait for process/lwp to stop, no timeout" },
|
||||
{ 0, NULL, NULL }
|
||||
};
|
||||
|
||||
static off_t lseek_offset;
|
||||
|
||||
int
|
||||
write_with_trace (fd, arg, len, file, line)
|
||||
int fd;
|
||||
long *arg;
|
||||
size_t len;
|
||||
char *file;
|
||||
int line;
|
||||
{
|
||||
int i;
|
||||
long opcode = arg[0];
|
||||
int ret;
|
||||
|
||||
if (procfs_trace)
|
||||
{
|
||||
if (procfs_file == NULL && procfs_filename != NULL)
|
||||
procfs_file = fopen (procfs_filename, "a");
|
||||
|
||||
for (i = 0; rw_table[i].name != NULL; i++)
|
||||
if (rw_table[i].value == opcode)
|
||||
break;
|
||||
|
||||
if (info_verbose)
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"%s:%d -- ", file, line);
|
||||
switch (opcode) {
|
||||
case PCSET:
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"write (PCSET, %s) %s\n",
|
||||
arg[1] == PR_FORK ? "PR_FORK" :
|
||||
arg[1] == PR_RLC ? "PR_RLC" :
|
||||
#ifdef PR_ASYNC
|
||||
arg[1] == PR_ASYNC ? "PR_ASYNC" :
|
||||
#endif
|
||||
"<unknown flag>",
|
||||
info_verbose ? rw_table[i].desc : "");
|
||||
break;
|
||||
#ifdef PCUNSET
|
||||
case PCUNSET:
|
||||
#endif
|
||||
#ifdef PCRESET
|
||||
case PCRESET:
|
||||
#endif
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"write (PCRESET, %s) %s\n",
|
||||
arg[1] == PR_FORK ? "PR_FORK" :
|
||||
arg[1] == PR_RLC ? "PR_RLC" :
|
||||
#ifdef PR_ASYNC
|
||||
arg[1] == PR_ASYNC ? "PR_ASYNC" :
|
||||
#endif
|
||||
"<unknown flag>",
|
||||
info_verbose ? rw_table[i].desc : "");
|
||||
break;
|
||||
case PCSTRACE:
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"write (PCSTRACE) ");
|
||||
proc_prettyfprint_signalset (procfs_file ? procfs_file : stdout,
|
||||
(sigset_t *) &arg[1], 0);
|
||||
break;
|
||||
case PCSFAULT:
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"write (PCSFAULT) ");
|
||||
proc_prettyfprint_faultset (procfs_file ? procfs_file : stdout,
|
||||
(fltset_t *) &arg[1], 0);
|
||||
break;
|
||||
case PCSENTRY:
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"write (PCSENTRY) ");
|
||||
proc_prettyfprint_syscalls (procfs_file ? procfs_file : stdout,
|
||||
(sysset_t *) &arg[1], 0);
|
||||
break;
|
||||
case PCSEXIT:
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"write (PCSEXIT) ");
|
||||
proc_prettyfprint_syscalls (procfs_file ? procfs_file : stdout,
|
||||
(sysset_t *) &arg[1], 0);
|
||||
break;
|
||||
case PCSHOLD:
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"write (PCSHOLD) ");
|
||||
proc_prettyfprint_signalset (procfs_file ? procfs_file : stdout,
|
||||
(sigset_t *) &arg[1], 0);
|
||||
break;
|
||||
case PCSSIG:
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"write (PCSSIG) ");
|
||||
proc_prettyfprint_signal (procfs_file ? procfs_file : stdout,
|
||||
arg[1] ? ((siginfo_t *) &arg[1])->si_signo
|
||||
: 0,
|
||||
0);
|
||||
fprintf (procfs_file ? procfs_file : stdout, "\n");
|
||||
break;
|
||||
case PCRUN:
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"write (PCRUN) ");
|
||||
if (arg[1] & PRCSIG)
|
||||
fprintf (procfs_file ? procfs_file : stdout, "clearSig ");
|
||||
if (arg[1] & PRCFAULT)
|
||||
fprintf (procfs_file ? procfs_file : stdout, "clearFlt ");
|
||||
if (arg[1] & PRSTEP)
|
||||
fprintf (procfs_file ? procfs_file : stdout, "step ");
|
||||
if (arg[1] & PRSABORT)
|
||||
fprintf (procfs_file ? procfs_file : stdout, "syscallAbort ");
|
||||
if (arg[1] & PRSTOP)
|
||||
fprintf (procfs_file ? procfs_file : stdout, "stopReq ");
|
||||
|
||||
fprintf (procfs_file ? procfs_file : stdout, "\n");
|
||||
break;
|
||||
case PCKILL:
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"write (PCKILL) ");
|
||||
proc_prettyfprint_signal (procfs_file ? procfs_file : stdout,
|
||||
arg[1], 0);
|
||||
fprintf (procfs_file ? procfs_file : stdout, "\n");
|
||||
break;
|
||||
default:
|
||||
{
|
||||
static unsigned char break_insn[] = BREAKPOINT;
|
||||
|
||||
if (len == sizeof (break_insn) &&
|
||||
memcmp (arg, &break_insn, len) == 0)
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"write (<breakpoint at 0x%08x>) \n", lseek_offset);
|
||||
else if (rw_table[i].name)
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"write (%s) %s\n",
|
||||
rw_table[i].name,
|
||||
info_verbose ? rw_table[i].desc : "");
|
||||
else
|
||||
{
|
||||
if (lseek_offset != -1)
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"write (<unknown>, %d bytes at 0x%08x) \n",
|
||||
len, lseek_offset);
|
||||
else
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"write (<unknown>, %d bytes) \n", len);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (procfs_file)
|
||||
fflush (procfs_file);
|
||||
}
|
||||
ret = write (fd, arg, len);
|
||||
if (procfs_trace && ret != len)
|
||||
{
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"[write (%s) FAILED!\n",
|
||||
rw_table[i].name != NULL ?
|
||||
rw_table[i].name : "<unknown>");
|
||||
if (procfs_file)
|
||||
fflush (procfs_file);
|
||||
}
|
||||
|
||||
lseek_offset = -1;
|
||||
return ret;
|
||||
}
|
||||
|
||||
off_t
|
||||
lseek_with_trace (fd, offset, whence, file, line)
|
||||
int fd;
|
||||
off_t offset;
|
||||
int whence;
|
||||
char *file;
|
||||
int line;
|
||||
{
|
||||
off_t ret;
|
||||
|
||||
#if 0 /* don't need output, just need address */
|
||||
if (procfs_trace)
|
||||
{
|
||||
if (procfs_file == NULL && procfs_filename != NULL)
|
||||
procfs_file = fopen (procfs_filename, "a");
|
||||
|
||||
if (info_verbose)
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"%s:%d -- ", file, line);
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"lseek (0x%08x, %s) \n", offset,
|
||||
whence == SEEK_SET ? "SEEK_SET" :
|
||||
whence == SEEK_CUR ? "SEEK_CUR" :
|
||||
whence == SEEK_END ? "SEEK_END" :
|
||||
"<unknown whence>");
|
||||
if (procfs_file)
|
||||
fflush (procfs_file);
|
||||
}
|
||||
#endif
|
||||
ret = lseek (fd, offset, whence);
|
||||
lseek_offset = ret;
|
||||
if (procfs_trace && ret == -1)
|
||||
{
|
||||
if (procfs_file == NULL && procfs_filename != NULL)
|
||||
procfs_file = fopen (procfs_filename, "a");
|
||||
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"[lseek (0x%08x) FAILED!\n", offset);
|
||||
if (procfs_file)
|
||||
fflush (procfs_file);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* NEW_PROC_API */
|
||||
|
||||
int
|
||||
open_with_trace (filename, mode, file, line)
|
||||
char *filename;
|
||||
int mode;
|
||||
char *file;
|
||||
int line;
|
||||
{
|
||||
int ret = open (filename, mode);
|
||||
|
||||
if (procfs_trace)
|
||||
{
|
||||
if (procfs_file == NULL && procfs_filename != NULL)
|
||||
procfs_file = fopen (procfs_filename, "a");
|
||||
|
||||
if (info_verbose)
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"%s:%d -- ", file, line);
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"%d = open (%s, ", ret, filename);
|
||||
if (mode == O_RDONLY)
|
||||
fprintf (procfs_file ? procfs_file : stdout, "O_RDONLY) %d\n", line);
|
||||
else if (mode == O_WRONLY)
|
||||
fprintf (procfs_file ? procfs_file : stdout, "O_WRONLY) %d\n", line);
|
||||
else if (mode == O_RDWR)
|
||||
fprintf (procfs_file ? procfs_file : stdout, "O_RDWR) %d\n", line);
|
||||
if (procfs_file)
|
||||
fflush (procfs_file);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
close_with_trace (fd, file, line)
|
||||
int fd;
|
||||
char *file;
|
||||
int line;
|
||||
{
|
||||
int ret = close (fd);
|
||||
|
||||
if (procfs_trace)
|
||||
{
|
||||
if (procfs_file == NULL && procfs_filename != NULL)
|
||||
procfs_file = fopen (procfs_filename, "a");
|
||||
|
||||
if (info_verbose)
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"%s:%d -- ", file, line);
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"%d = close (%d)\n", ret, fd);
|
||||
if (procfs_file)
|
||||
fflush (procfs_file);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
wait_with_trace (wstat, file, line)
|
||||
int *wstat;
|
||||
char *file;
|
||||
int line;
|
||||
{
|
||||
int ret, lstat = 0;
|
||||
|
||||
if (procfs_trace)
|
||||
{
|
||||
if (procfs_file == NULL && procfs_filename != NULL)
|
||||
procfs_file = fopen (procfs_filename, "a");
|
||||
|
||||
if (info_verbose)
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"%s:%d -- ", file, line);
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"wait (line %d) ", line);
|
||||
if (procfs_file)
|
||||
fflush (procfs_file);
|
||||
}
|
||||
ret = wait (&lstat);
|
||||
if (procfs_trace)
|
||||
{
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"returned pid %d, status 0x%x\n", ret, lstat);
|
||||
if (procfs_file)
|
||||
fflush (procfs_file);
|
||||
}
|
||||
if (wstat)
|
||||
*wstat = lstat;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
procfs_note (msg, file, line)
|
||||
char *msg;
|
||||
char *file;
|
||||
int line;
|
||||
{
|
||||
if (procfs_trace)
|
||||
{
|
||||
if (procfs_file == NULL && procfs_filename != NULL)
|
||||
procfs_file = fopen (procfs_filename, "a");
|
||||
|
||||
if (info_verbose)
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"%s:%d -- ", file, line);
|
||||
fprintf (procfs_file ? procfs_file : stdout, msg);
|
||||
if (procfs_file)
|
||||
fflush (procfs_file);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
proc_prettyfprint_status (flags, why, what, thread)
|
||||
long flags;
|
||||
int why;
|
||||
int what;
|
||||
int thread;
|
||||
{
|
||||
if (procfs_trace)
|
||||
{
|
||||
if (procfs_file == NULL && procfs_filename != NULL)
|
||||
procfs_file = fopen (procfs_filename, "a");
|
||||
|
||||
if (thread)
|
||||
fprintf (procfs_file ? procfs_file : stdout,
|
||||
"Thread %d: ", thread);
|
||||
|
||||
proc_prettyfprint_flags (procfs_file ? procfs_file : stdout,
|
||||
flags, 0);
|
||||
|
||||
if (flags & (PR_STOPPED | PR_ISTOP))
|
||||
proc_prettyfprint_why (procfs_file ? procfs_file : stdout,
|
||||
why, what, 0);
|
||||
if (procfs_file)
|
||||
fflush (procfs_file);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_initialize_proc_api ()
|
||||
{
|
||||
struct cmd_list_element *c;
|
||||
|
||||
c = add_set_cmd ("procfs-trace", no_class,
|
||||
var_boolean, (char *) &procfs_trace,
|
||||
"Set tracing for /proc ioctl calls.\n", &setlist);
|
||||
|
||||
add_show_from_set (c, &showlist);
|
||||
c->function.sfunc = set_procfs_trace_cmd;
|
||||
|
||||
c = add_set_cmd ("procfs-file", no_class, var_filename,
|
||||
(char *) &procfs_filename,
|
||||
"Set filename for /proc tracefile.\n", &setlist);
|
||||
|
||||
add_show_from_set (c, &showlist);
|
||||
c->function.sfunc = set_procfs_file_cmd;
|
||||
|
||||
#ifdef TRACE_PROCFS
|
||||
if (procfs_file == NULL && procfs_filename != NULL)
|
||||
procfs_file = fopen (procfs_filename, "a");
|
||||
#endif
|
||||
}
|
1785
gdb/proc_events.c
Executable file
1785
gdb/proc_events.c
Executable file
File diff suppressed because it is too large
Load diff
275
gdb/proc_flags.c
Executable file
275
gdb/proc_flags.c
Executable file
|
@ -0,0 +1,275 @@
|
|||
/*
|
||||
* Pretty-print the prstatus flags.
|
||||
*
|
||||
* Arguments: unsigned long flags, int verbose
|
||||
*
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
#if defined (NEW_PROC_API)
|
||||
#define _STRUCTURED_PROC 1
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/procfs.h>
|
||||
|
||||
/* Much of the information used in the /proc interface, particularly for
|
||||
printing status information, is kept as tables of structures of the
|
||||
following form. These tables can be used to map numeric values to
|
||||
their symbolic names and to a string that describes their specific use. */
|
||||
|
||||
struct trans {
|
||||
int value; /* The numeric value */
|
||||
char *name; /* The equivalent symbolic value */
|
||||
char *desc; /* Short description of value */
|
||||
};
|
||||
|
||||
/* Translate bits in the pr_flags member of the prstatus structure,
|
||||
into the names and desc information. */
|
||||
|
||||
static struct trans pr_flag_table[] =
|
||||
{
|
||||
#if defined (PR_STOPPED)
|
||||
/* Sol2.5: lwp is stopped
|
||||
* Sol2.6: lwp is stopped
|
||||
* Sol2.7: lwp is stopped
|
||||
* IRIX6: process is stopped
|
||||
* OSF: task/thread is stopped
|
||||
* UW: LWP is stopped
|
||||
*/
|
||||
{ PR_STOPPED, "PR_STOPPED", "Process (LWP) is stopped" },
|
||||
#endif
|
||||
#if defined (PR_ISTOP)
|
||||
/* Sol2.5: lwp is stopped on an event of interest
|
||||
* Sol2.6: lwp is stopped on an event of interest
|
||||
* Sol2.7: lwp is stopped on an event of interest
|
||||
* IRIX6: process is stopped on event of interest
|
||||
* OSF: task/thread stopped on event of interest
|
||||
* UW: LWP stopped on an event of interest
|
||||
*/
|
||||
{ PR_ISTOP, "PR_ISTOP", "Stopped on an event of interest" },
|
||||
#endif
|
||||
#if defined (PR_DSTOP)
|
||||
/* Sol2.5: lwp has a stop directive in effect
|
||||
* Sol2.6: lwp has a stop directive in effect
|
||||
* Sol2.7: lwp has a stop directive in effect
|
||||
* IRIX6: process has stop directive in effect
|
||||
* OSF: task/thread has stop directive in effect
|
||||
* UW: A stop directive is in effect
|
||||
*/
|
||||
{ PR_DSTOP, "PR_DSTOP", "A stop directive is in effect" },
|
||||
#endif
|
||||
#if defined (PR_STEP)
|
||||
/* Sol2.5: lwp has a single-step directive in effect
|
||||
* Sol2.6: lwp has a single-step directive in effect
|
||||
* Sol2.7: lwp has a single-step directive in effect
|
||||
* IRIX6: process has single step pending
|
||||
*/
|
||||
{ PR_STEP, "PR_STEP", "A single step directive is in effect" },
|
||||
#endif
|
||||
#if defined (PR_ASLEEP)
|
||||
/* Sol2.5: lwp is sleeping in a system call
|
||||
* Sol2.6: lwp is sleeping in a system call
|
||||
* Sol2.7: lwp is sleeping in a system call
|
||||
* IRIX6: process is in an interruptible sleep
|
||||
* OSF: task/thread is asleep within a system call
|
||||
* UW: LWP is sleep()ing in a system call
|
||||
*/
|
||||
{ PR_ASLEEP, "PR_ASLEEP", "Sleeping in an (interruptible) system call" },
|
||||
#endif
|
||||
#if defined (PR_PCINVAL)
|
||||
/* Sol2.5: contents of pr_instr undefined
|
||||
* Sol2.6: contents of pr_instr undefined
|
||||
* Sol2.7: contents of pr_instr undefined
|
||||
* IRIX6: current pc is invalid
|
||||
* OSF: program counter contains invalid address
|
||||
* UW: %pc refers to an invalid virtual address
|
||||
*/
|
||||
{ PR_PCINVAL, "PR_PCINVAL", "PC (pr_instr) is invalid" },
|
||||
#endif
|
||||
#if defined (PR_ASLWP)
|
||||
/* Sol2.5: this lwp is the aslwp
|
||||
* Sol2.6: this lwp is the aslwp
|
||||
* Sol2.7: this lwp is the aslwp
|
||||
*/
|
||||
{ PR_ASLWP, "PR_ASLWP", "This is the asynchronous signal LWP" },
|
||||
#endif
|
||||
#if defined (PR_AGENT)
|
||||
/* Sol2.6: this lwp is the /proc agent lwp
|
||||
* Sol2.7: this lwp is the /proc agent lwp
|
||||
*/
|
||||
{ PR_AGENT, "PR_AGENT", "This is the /proc agent LWP" },
|
||||
#endif
|
||||
#if defined (PR_ISSYS)
|
||||
/* Sol2.5: system process
|
||||
* Sol2.6: this is a system process
|
||||
* Sol2.7: this is a system process
|
||||
* IRIX6: process is a system process
|
||||
* OSF: task/thread is a system task/thread
|
||||
* UW: System process
|
||||
*/
|
||||
{ PR_ISSYS, "PR_ISSYS", "Is a system process/thread" },
|
||||
#endif
|
||||
#if defined (PR_VFORKP)
|
||||
/* Sol2.6: process is the parent of a vfork()d child
|
||||
* Sol2.7: process is the parent of a vfork()d child
|
||||
*/
|
||||
{ PR_VFORKP, "PR_VFORKP", "Process is the parent of a vforked child" },
|
||||
#endif
|
||||
#ifdef PR_ORPHAN
|
||||
/* Sol2.6: process's process group is orphaned
|
||||
* Sol2.7: process's process group is orphaned
|
||||
*/
|
||||
{ PR_ORPHAN, "PR_ORPHAN", "Process's process group is orphaned" },
|
||||
#endif
|
||||
#if defined (PR_FORK)
|
||||
/* Sol2.5: inherit-on-fork is in effect
|
||||
* Sol2.6: inherit-on-fork is in effect
|
||||
* Sol2.7: inherit-on-fork is in effect
|
||||
* IRIX6: process has inherit-on-fork flag set
|
||||
* OSF: task/thread has inherit-on-fork flag set
|
||||
* UW: inherit-on-fork is in effect
|
||||
*/
|
||||
{ PR_FORK, "PR_FORK", "Inherit-on-fork is in effect" },
|
||||
#endif
|
||||
#if defined (PR_RLC)
|
||||
/* Sol2.5: run-on-last-close is in effect
|
||||
* Sol2.6: run-on-last-close is in effect
|
||||
* Sol2.7: run-on-last-close is in effect
|
||||
* IRIX6: process has run-on-last-close flag set
|
||||
* OSF: task/thread has run-on-last-close flag set
|
||||
* UW: Run-on-last-close is in effect
|
||||
*/
|
||||
{ PR_RLC, "PR_RLC", "Run-on-last-close is in effect" },
|
||||
#endif
|
||||
#if defined (PR_KLC)
|
||||
/* Sol2.5: kill-on-last-close is in effect
|
||||
* Sol2.6: kill-on-last-close is in effect
|
||||
* Sol2.7: kill-on-last-close is in effect
|
||||
* IRIX6: process has kill-on-last-close flag set
|
||||
* OSF: kill-on-last-close, superceeds RLC
|
||||
* UW: kill-on-last-close is in effect
|
||||
*/
|
||||
{ PR_KLC, "PR_KLC", "Kill-on-last-close is in effect" },
|
||||
#endif
|
||||
#if defined (PR_ASYNC)
|
||||
/* Sol2.5: asynchronous-stop is in effect
|
||||
* Sol2.6: asynchronous-stop is in effect
|
||||
* Sol2.7: asynchronous-stop is in effect
|
||||
* OSF: asynchronous stop mode is in effect
|
||||
* UW: asynchronous stop mode is in effect
|
||||
*/
|
||||
{ PR_ASYNC, "PR_ASYNC", "Asynchronous stop is in effect" },
|
||||
#endif
|
||||
#if defined (PR_MSACCT)
|
||||
/* Sol2.5: micro-state usage accounting is in effect
|
||||
* Sol2.6: micro-state usage accounting is in effect
|
||||
* Sol2.7: micro-state usage accounting is in effect
|
||||
*/
|
||||
{ PR_MSACCT, "PR_MSACCT", "Microstate accounting enabled" },
|
||||
#endif
|
||||
#if defined (PR_BPTADJ)
|
||||
/* Sol2.5: breakpoint trap pc adjustment is in effect
|
||||
* Sol2.6: breakpoint trap pc adjustment is in effect
|
||||
* Sol2.7: breakpoint trap pc adjustment is in effect
|
||||
*/
|
||||
{ PR_BPTADJ, "PR_BPTADJ", "Breakpoint PC adjustment in effect" },
|
||||
#endif
|
||||
#if defined (PR_PTRACE)
|
||||
/* Note: different meanings on Solaris and Irix 6
|
||||
* Sol2.5: obsolete, never set in SunOS5.0
|
||||
* Sol2.6: ptrace-compatibility mode is in effect
|
||||
* Sol2.7: ptrace-compatibility mode is in effect
|
||||
* IRIX6: process is traced with ptrace() too
|
||||
* OSF: task/thread is being traced by ptrace
|
||||
* UW: Process is being controlled by ptrace(2)
|
||||
*/
|
||||
{ PR_PTRACE, "PR_PTRACE", "Process is being controlled by ptrace" },
|
||||
#endif
|
||||
#if defined (PR_PCOMPAT)
|
||||
/* Note: PCOMPAT on Sol2.5 means same thing as PTRACE on Sol2.6
|
||||
* Sol2.5 (only): ptrace-compatibility mode is in effect
|
||||
*/
|
||||
{ PR_PCOMPAT, "PR_PCOMPAT", "Ptrace compatibility mode in effect" },
|
||||
#endif
|
||||
#ifdef PR_MSFORK
|
||||
/* Sol2.6: micro-state accounting inherited on fork
|
||||
* Sol2.7: micro-state accounting inherited on fork
|
||||
*/
|
||||
{ PR_MSFORK, "PR_PCOMPAT", "Micro-state accounting inherited on fork" },
|
||||
#endif
|
||||
|
||||
#ifdef PR_ISKTHREAD
|
||||
/* Irix6: process is a kernel thread */
|
||||
{ PR_ISKTHREAD, "PR_KTHREAD", "Process is a kernel thread" },
|
||||
#endif
|
||||
|
||||
#ifdef PR_ABORT
|
||||
/* OSF (only): abort the current stop condition */
|
||||
{ PR_ABORT, "PR_ABORT", "Abort the current stop condition" },
|
||||
#endif
|
||||
|
||||
#ifdef PR_TRACING
|
||||
/* OSF: task is traced */
|
||||
{ PR_TRACING, "PR_TRACING", "Task is traced" },
|
||||
#endif
|
||||
|
||||
#ifdef PR_STOPFORK
|
||||
/* OSF: stop child on fork */
|
||||
{ PR_STOPFORK, "PR_STOPFORK", "Stop child on fork" },
|
||||
#endif
|
||||
|
||||
#ifdef PR_STOPEXEC
|
||||
/* OSF: stop on exec */
|
||||
{ PR_STOPEXEC, "PR_STOPEXEC", "Stop on exec" },
|
||||
#endif
|
||||
|
||||
#ifdef PR_STOPTERM
|
||||
/* OSF: stop on task exit */
|
||||
{ PR_STOPTERM, "PR_STOPTERM", "Stop on task exit" },
|
||||
#endif
|
||||
|
||||
#ifdef PR_STOPTCR
|
||||
/* OSF: stop on thread creation */
|
||||
{ PR_STOPTCR, "PR_STOPTCR", "Stop on thread creation" },
|
||||
#endif
|
||||
|
||||
#ifdef PR_STOPTTERM
|
||||
/* OSF: stop on thread exit */
|
||||
{ PR_STOPTTERM, "PR_STOPTTERM", "Stop on thread exit" },
|
||||
#endif
|
||||
|
||||
#ifdef PR_USCHED
|
||||
/* OSF: user level scheduling is in effect */
|
||||
{ PR_USCHED, "PR_USCHED", "User level scheduling is in effect" },
|
||||
#endif
|
||||
};
|
||||
|
||||
void
|
||||
proc_prettyfprint_flags (file, flags, verbose)
|
||||
FILE *file;
|
||||
unsigned long flags;
|
||||
int verbose;
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < sizeof (pr_flag_table) / sizeof (pr_flag_table[0]); i++)
|
||||
if (flags & pr_flag_table[i].value)
|
||||
{
|
||||
fprintf (file, "%s ", pr_flag_table[i].name);
|
||||
if (verbose)
|
||||
fprintf (file, "%s\n", pr_flag_table[i].desc);
|
||||
}
|
||||
if (!verbose)
|
||||
fprintf (file, "\n");
|
||||
}
|
||||
|
||||
void
|
||||
proc_prettyprint_flags (flags, verbose)
|
||||
unsigned long flags;
|
||||
int verbose;
|
||||
{
|
||||
proc_prettyfprint_flags (stdout, flags, verbose);
|
||||
}
|
158
gdb/proc_why.c
Executable file
158
gdb/proc_why.c
Executable file
|
@ -0,0 +1,158 @@
|
|||
/*
|
||||
* Pretty-print the pr_why value.
|
||||
*
|
||||
* Arguments: unsigned long flags, int verbose
|
||||
*
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
#if defined(NEW_PROC_API)
|
||||
#define _STRUCTURED_PROC 1
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/procfs.h>
|
||||
|
||||
/* Much of the information used in the /proc interface, particularly for
|
||||
printing status information, is kept as tables of structures of the
|
||||
following form. These tables can be used to map numeric values to
|
||||
their symbolic names and to a string that describes their specific use. */
|
||||
|
||||
struct trans {
|
||||
int value; /* The numeric value */
|
||||
char *name; /* The equivalent symbolic value */
|
||||
char *desc; /* Short description of value */
|
||||
};
|
||||
|
||||
/* Translate values in the pr_why field of the prstatus struct. */
|
||||
|
||||
static struct trans pr_why_table[] =
|
||||
{
|
||||
#if defined (PR_REQUESTED)
|
||||
/* All platforms */
|
||||
{ PR_REQUESTED, "PR_REQUESTED",
|
||||
"Directed to stop by debugger via P(IO)CSTOP or P(IO)CWSTOP" },
|
||||
#endif
|
||||
#if defined (PR_SIGNALLED)
|
||||
/* All platforms */
|
||||
{ PR_SIGNALLED, "PR_SIGNALLED", "Receipt of a traced signal" },
|
||||
#endif
|
||||
#if defined (PR_SYSENTRY)
|
||||
/* All platforms */
|
||||
{ PR_SYSENTRY, "PR_SYSENTRY", "Entry to a traced system call" },
|
||||
#endif
|
||||
#if defined (PR_SYSEXIT)
|
||||
/* All platforms */
|
||||
{ PR_SYSEXIT, "PR_SYSEXIT", "Exit from a traced system call" },
|
||||
#endif
|
||||
#if defined (PR_JOBCONTROL)
|
||||
/* All platforms */
|
||||
{ PR_JOBCONTROL, "PR_JOBCONTROL", "Default job control stop signal action" },
|
||||
#endif
|
||||
#if defined (PR_FAULTED)
|
||||
/* All platforms */
|
||||
{ PR_FAULTED, "PR_FAULTED", "Incurred a traced hardware fault" },
|
||||
#endif
|
||||
#if defined (PR_SUSPENDED)
|
||||
/* Solaris and UnixWare */
|
||||
{ PR_SUSPENDED, "PR_SUSPENDED", "Process suspended" },
|
||||
#endif
|
||||
#if defined (PR_CHECKPOINT)
|
||||
/* Solaris only */
|
||||
{ PR_CHECKPOINT, "PR_CHECKPOINT", "Process stopped at checkpoint" },
|
||||
#endif
|
||||
#if defined (PR_FORKSTOP)
|
||||
/* OSF only */
|
||||
{ PR_FORKSTOP, "PR_FORKSTOP", "Process stopped at end of fork call" },
|
||||
#endif
|
||||
#if defined (PR_TCRSTOP)
|
||||
/* OSF only */
|
||||
{ PR_TCRSTOP, "PR_TCRSTOP", "Process stopped on thread creation" },
|
||||
#endif
|
||||
#if defined (PR_TTSTOP)
|
||||
/* OSF only */
|
||||
{ PR_TTSTOP, "PR_TTSTOP", "Process stopped on thread termination" },
|
||||
#endif
|
||||
#if defined (PR_DEAD)
|
||||
/* OSF only */
|
||||
{ PR_DEAD, "PR_DEAD", "Process stopped in exit system call" },
|
||||
#endif
|
||||
};
|
||||
|
||||
void
|
||||
proc_prettyfprint_why (file, why, what, verbose)
|
||||
FILE *file;
|
||||
unsigned long why;
|
||||
unsigned long what;
|
||||
int verbose;
|
||||
{
|
||||
int i;
|
||||
|
||||
if (why == 0)
|
||||
return;
|
||||
|
||||
for (i = 0; i < sizeof (pr_why_table) / sizeof (pr_why_table[0]); i++)
|
||||
if (why == pr_why_table[i].value)
|
||||
{
|
||||
fprintf (file, "%s ", pr_why_table[i].name);
|
||||
if (verbose)
|
||||
fprintf (file, ": %s ", pr_why_table[i].desc);
|
||||
|
||||
switch (why) {
|
||||
#ifdef PR_REQUESTED
|
||||
case PR_REQUESTED:
|
||||
break; /* Nothing more to print. */
|
||||
#endif
|
||||
#ifdef PR_SIGNALLED
|
||||
case PR_SIGNALLED:
|
||||
proc_prettyfprint_signal (file, what, verbose);
|
||||
break;
|
||||
#endif
|
||||
#ifdef PR_FAULTED
|
||||
case PR_FAULTED:
|
||||
proc_prettyfprint_fault (file, what, verbose);
|
||||
break;
|
||||
#endif
|
||||
#ifdef PR_SYSENTRY
|
||||
case PR_SYSENTRY:
|
||||
fprintf (file, "Entry to ");
|
||||
proc_prettyfprint_syscall (file, what, verbose);
|
||||
break;
|
||||
#endif
|
||||
#ifdef PR_SYSEXIT
|
||||
case PR_SYSEXIT:
|
||||
fprintf (file, "Exit from ");
|
||||
proc_prettyfprint_syscall (file, what, verbose);
|
||||
break;
|
||||
#endif
|
||||
#ifdef PR_JOBCONTROL
|
||||
case PR_JOBCONTROL:
|
||||
proc_prettyfprint_signal (file, what, verbose);
|
||||
break;
|
||||
#endif
|
||||
#ifdef PR_DEAD
|
||||
case PR_DEAD:
|
||||
fprintf (file, "Exit status: %d\n", what);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
fprintf (file, "Unknown why %d, what %d\n", why, what);
|
||||
break;
|
||||
}
|
||||
fprintf (file, "\n");
|
||||
|
||||
return;
|
||||
}
|
||||
fprintf (file, "Unknown pr_why.\n");
|
||||
}
|
||||
|
||||
void
|
||||
proc_prettyprint_why (why, what, verbose)
|
||||
unsigned long why;
|
||||
unsigned long what;
|
||||
int verbose;
|
||||
{
|
||||
proc_prettyfprint_why (stdout, why, what, verbose);
|
||||
}
|
10499
gdb/procfs.c
10499
gdb/procfs.c
File diff suppressed because it is too large
Load diff
|
@ -392,6 +392,7 @@ static void (*old_handler)();
|
|||
#endif
|
||||
|
||||
static bool boot_interrupted = FALSE;
|
||||
static volatile bool interrupt_request = FALSE;
|
||||
|
||||
static void ardi_sigint_handler(int sig) {
|
||||
#ifdef DEBUG
|
||||
|
@ -401,6 +402,7 @@ static void ardi_sigint_handler(int sig) {
|
|||
IGNORE(sig);
|
||||
#endif
|
||||
boot_interrupted = TRUE;
|
||||
interrupt_request = TRUE;
|
||||
#ifndef __unix
|
||||
signal(SIGINT, ardi_sigint_handler);
|
||||
#endif
|
||||
|
@ -1306,7 +1308,6 @@ static int HandleStoppedMessage(Packet *packet, void *stateptr) {
|
|||
return RDIError_NoError;
|
||||
}
|
||||
|
||||
static volatile bool interrupt_request = FALSE;
|
||||
|
||||
static void interrupt_target( void )
|
||||
{
|
||||
|
@ -1397,6 +1398,7 @@ static int angel_RDI_ExecuteOrStep(PointHandle *handle, word type,
|
|||
angel_DebugPrint("Waiting for program to finish...\n");
|
||||
#endif
|
||||
|
||||
signal(SIGINT, ardi_sigint_handler);
|
||||
while( executing )
|
||||
{
|
||||
if (interrupt_request)
|
||||
|
@ -1406,6 +1408,8 @@ static int angel_RDI_ExecuteOrStep(PointHandle *handle, word type,
|
|||
}
|
||||
Adp_AsynchronousProcessing( async_block_on_nothing );
|
||||
}
|
||||
signal(SIGINT, SIG_IGN);
|
||||
|
||||
|
||||
#ifdef TEST_DC_APPL
|
||||
Adp_Install_DC_Appl_Handler( NULL );
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "adp.h"
|
||||
#include "sys.h"
|
||||
#include "hsys.h"
|
||||
#include "rxtx.h"
|
||||
#include "drivers.h"
|
||||
|
@ -107,6 +108,7 @@ static void dumpPacket(FILE *fp, char *label, struct data_packet *p)
|
|||
{
|
||||
unsigned r;
|
||||
int i;
|
||||
unsigned char channel;
|
||||
|
||||
if (!fp)
|
||||
return;
|
||||
|
@ -116,12 +118,14 @@ static void dumpPacket(FILE *fp, char *label, struct data_packet *p)
|
|||
fprintf(fp,"%02x ",p->data[i]);
|
||||
fprintf(fp,"\n");
|
||||
|
||||
channel = p->data[0];
|
||||
|
||||
r = WordAt(p->data+4);
|
||||
|
||||
fprintf(fp,"R=%08x ",r);
|
||||
fprintf(fp,"%s ", r&0x80000000 ? "H<-T" : "H->T");
|
||||
|
||||
switch ((r>>16) & 0xff)
|
||||
switch (channel)
|
||||
{
|
||||
case CI_PRIVATE: fprintf(fp,"CI_PRIVATE: "); break;
|
||||
case CI_HADP: fprintf(fp,"CI_HADP: "); break;
|
||||
|
@ -176,6 +180,28 @@ static void dumpPacket(FILE *fp, char *label, struct data_packet *p)
|
|||
case ADP_Stopped: fprintf(fp," ADP_Stopped "); break;
|
||||
case ADP_TDCC_ToHost: fprintf(fp," ADP_TDCC_ToHost "); break;
|
||||
case ADP_TDCC_FromHost: fprintf(fp," ADP_TDCC_FromHost "); break;
|
||||
|
||||
case CL_Unrecognised: fprintf(fp," CL_Unrecognised "); break;
|
||||
case CL_WriteC: fprintf(fp," CL_WriteC "); break;
|
||||
case CL_Write0: fprintf(fp," CL_Write0 "); break;
|
||||
case CL_ReadC: fprintf(fp," CL_ReadC "); break;
|
||||
case CL_System: fprintf(fp," CL_System "); break;
|
||||
case CL_GetCmdLine: fprintf(fp," CL_GetCmdLine "); break;
|
||||
case CL_Clock: fprintf(fp," CL_Clock "); break;
|
||||
case CL_Time: fprintf(fp," CL_Time "); break;
|
||||
case CL_Remove: fprintf(fp," CL_Remove "); break;
|
||||
case CL_Rename: fprintf(fp," CL_Rename "); break;
|
||||
case CL_Open: fprintf(fp," CL_Open "); break;
|
||||
case CL_Close: fprintf(fp," CL_Close "); break;
|
||||
case CL_Write: fprintf(fp," CL_Write "); break;
|
||||
case CL_WriteX: fprintf(fp," CL_WriteX "); break;
|
||||
case CL_Read: fprintf(fp," CL_Read "); break;
|
||||
case CL_ReadX: fprintf(fp," CL_ReadX "); break;
|
||||
case CL_Seek: fprintf(fp," CL_Seek "); break;
|
||||
case CL_Flen: fprintf(fp," CL_Flen "); break;
|
||||
case CL_IsTTY: fprintf(fp," CL_IsTTY "); break;
|
||||
case CL_TmpNam: fprintf(fp," CL_TmpNam "); break;
|
||||
|
||||
default: fprintf(fp," BadReason "); break;
|
||||
}
|
||||
|
||||
|
@ -410,7 +436,7 @@ AdpErrs DevSW_Match(const DeviceDescr *device, const char *name,
|
|||
return (device->DeviceMatch(name, arg) == -1) ? adp_failed : adp_ok;
|
||||
}
|
||||
|
||||
AdpErrs DevSW_Close(const DeviceDescr *device, const DevChanID type)
|
||||
AdpErrs DevSW_Close (DeviceDescr *device, const DevChanID type)
|
||||
{
|
||||
DevSWState *ds = (DevSWState *)(device->SwitcherState);
|
||||
Packet *pk;
|
||||
|
|
|
@ -160,7 +160,7 @@ AdpErrs DevSW_Match(const DeviceDescr *device, const char *name,
|
|||
* OK: adp_ok
|
||||
* Error: adp_device_not_open
|
||||
*/
|
||||
AdpErrs DevSW_Close(const DeviceDescr *device, const DevChanID type);
|
||||
AdpErrs DevSW_Close(DeviceDescr *device, const DevChanID type);
|
||||
|
||||
/*
|
||||
* Function: DevSW_Read
|
||||
|
|
|
@ -266,9 +266,12 @@ static int open_socket(void)
|
|||
static void fetch_ports(void)
|
||||
{
|
||||
int i;
|
||||
const char ctrlpacket[] = CTRL_MAGIC;
|
||||
char ctrlpacket[10];
|
||||
CtrlResponse response;
|
||||
|
||||
memset (ctrlpacket, 0, 10);
|
||||
strcpy (ctrlpacket, CTRL_MAGIC);
|
||||
memset (response, 0, sizeof(CtrlResponse));
|
||||
/*
|
||||
* we will try 3 times to elicit a response from the target
|
||||
*/
|
||||
|
|
|
@ -1446,6 +1446,7 @@ sol_find_new_threads ()
|
|||
printf_filtered ("No process.\n");
|
||||
return;
|
||||
}
|
||||
procfs_find_new_threads (); /* first find new kernel threads. */
|
||||
p_td_ta_thr_iter (main_ta, sol_find_new_threads_callback, (void *) 0,
|
||||
TD_THR_ANY_STATE, TD_THR_LOWEST_PRIORITY,
|
||||
TD_SIGNO_MASK, TD_THR_ANY_USER_FLAGS);
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
2000-01-04 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||
|
||||
From Jim Kingdon <kingdon@redhat.com>:
|
||||
|
||||
* gdb.c++/annota2.exp: Fix "delete bps" test to wait for the
|
||||
prompt (cleanup rather than necessity, but still might keep output
|
||||
from spilling to next test).
|
||||
|
||||
2000-01-02 Fred Fish <fnf@cygnus.com>
|
||||
|
||||
* gdb.base/ptype.c (FALSE, TRUE): #undef these to avoid clash on
|
||||
AIX, which defines them in <sys/types.h>.
|
||||
|
||||
1999-12-16 Stan Shebs <shebs@andros.cygnus.com>
|
||||
|
||||
* gdb.base/default.exp: Match arm* etc instead of arm in "info
|
||||
|
|
|
@ -271,7 +271,7 @@ if { $hp_aCC_compiler } {
|
|||
}
|
||||
}
|
||||
|
||||
gdb_test "next" ".*"
|
||||
gdb_test "next" "t_structs_c\\(struct_val1\\);.*"
|
||||
do_function_calls
|
||||
|
||||
return 0
|
||||
|
|
|
@ -212,6 +212,8 @@ enum colors {yellow, purple, pink} nonprimary;
|
|||
enum {chevy, ford} clunker;
|
||||
enum cars {bmw, porsche} sportscar;
|
||||
|
||||
#undef FALSE
|
||||
#undef TRUE
|
||||
typedef enum {FALSE, TRUE} boolean;
|
||||
boolean v_boolean;
|
||||
/*note: aCC has bool type predefined with 'false' and 'true'*/
|
||||
|
|
|
@ -139,7 +139,7 @@ gdb_expect {
|
|||
-re ".*Delete all breakpoints. \\(y or n\\) \r\n\032\032query.*$" {
|
||||
send_gdb "y\n"
|
||||
gdb_expect {
|
||||
-re " " { pass "delete bps" }
|
||||
-re " .*$gdb_prompt$" { pass "delete bps" }
|
||||
-re ".*$gdb_prompt$" { fail "delete bps" }
|
||||
timeout { fail "delete bps (timeout)" }
|
||||
}
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
1999-12-30 Chandra Chavva <cchavva@cygnus.com>
|
||||
|
||||
* d10v/d10v_sim.h (INC_ADDR): Added code to assign
|
||||
proper address for loads with predec operations.
|
||||
|
||||
1999-11-18 Ben Elliston <bje@cygnus.com>
|
||||
|
||||
* configure.in: Require autoconf 2.13 and remove obsolete
|
||||
|
|
|
@ -1,3 +1,17 @@
|
|||
Mon Jan 3 02:06:07 2000 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* interp.c (lookup_hash): Stop the update of the PC when there was
|
||||
an illegal instruction exception.
|
||||
|
||||
Mon Jan 3 00:14:33 2000 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* simops.c (address_exception): New function.
|
||||
(OP_30000000, OP_6401, OP_6001, OP_6000, OP_32010000, OP_31000000,
|
||||
OP_6601, OP_6201, OP_6200, OP_33010000, OP_34000000, OP_6800,
|
||||
OP_6C1F, OP_6801, OP_6C01, OP_36010000, OP_35000000, OP_6A00,
|
||||
OP_6E1F, OP_6A01, OP_6E01, OP_37010000): For "ld", "ld2w", "st"
|
||||
and "st2w" check that the address is aligned.
|
||||
|
||||
1999-11-25 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* simops.c (OP_4E0F): New function: Simulate new bit pattern for
|
||||
|
|
|
@ -432,7 +432,8 @@ enum
|
|||
#define INC_ADDR(x,i) \
|
||||
do \
|
||||
{ \
|
||||
if (PSW_MD && GPR (x) == (MOD_E & ~((i) - 1))) \
|
||||
int test_i = i < 0 ? i : ~((i) - 1); \
|
||||
if (PSW_MD && GPR (x) == (MOD_E & test_i)) \
|
||||
SET_GPR (x, MOD_S); \
|
||||
else \
|
||||
SET_GPR (x, GPR (x) + (i)); \
|
||||
|
|
|
@ -102,6 +102,7 @@ lookup_hash (ins, size)
|
|||
(*d10v_callback->printf_filtered)
|
||||
(d10v_callback, "ERROR: Illegal instruction %x at PC %x\n", ins, PC);
|
||||
State.exception = SIGILL;
|
||||
State.pc_changed = 1; /* Don't increment the PC. */
|
||||
return NULL;
|
||||
}
|
||||
h = h->next;
|
||||
|
|
|
@ -118,6 +118,16 @@ move_to_cr (int cr, reg_t mask, reg_t val, int psw_hw_p)
|
|||
return val;
|
||||
}
|
||||
|
||||
/* Modify registers according to an AE - address exception. */
|
||||
static void
|
||||
address_exception (void)
|
||||
{
|
||||
SET_BPC (PC);
|
||||
SET_BPSW (PSW);
|
||||
SET_HW_PSW ((PSW & (PSW_F0_BIT | PSW_F1_BIT | PSW_C_BIT)));
|
||||
JMP (AE_VECTOR_START);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
static void trace_input_func PARAMS ((char *name,
|
||||
enum op_types in1,
|
||||
|
@ -1313,8 +1323,15 @@ void
|
|||
OP_30000000 ()
|
||||
{
|
||||
uint16 tmp;
|
||||
uint16 addr = OP[1] + GPR (OP[2]);
|
||||
trace_input ("ld", OP_REG_OUTPUT, OP_MEMREF2, OP_VOID);
|
||||
tmp = RW (OP[1] + GPR (OP[2]));
|
||||
if ((addr & 1))
|
||||
{
|
||||
address_exception ();
|
||||
trace_output_void ();
|
||||
return;
|
||||
}
|
||||
tmp = RW (addr);
|
||||
SET_GPR (OP[0], tmp);
|
||||
trace_output_16 (tmp);
|
||||
}
|
||||
|
@ -1324,8 +1341,15 @@ void
|
|||
OP_6401 ()
|
||||
{
|
||||
uint16 tmp;
|
||||
uint16 addr = GPR (OP[1]);
|
||||
trace_input ("ld", OP_REG_OUTPUT, OP_POSTDEC, OP_VOID);
|
||||
tmp = RW (GPR (OP[1]));
|
||||
if ((addr & 1))
|
||||
{
|
||||
address_exception ();
|
||||
trace_output_void ();
|
||||
return;
|
||||
}
|
||||
tmp = RW (addr);
|
||||
SET_GPR (OP[0], tmp);
|
||||
if (OP[0] != OP[1])
|
||||
INC_ADDR (OP[1], -2);
|
||||
|
@ -1337,8 +1361,15 @@ void
|
|||
OP_6001 ()
|
||||
{
|
||||
uint16 tmp;
|
||||
uint16 addr = GPR (OP[1]);
|
||||
trace_input ("ld", OP_REG_OUTPUT, OP_POSTINC, OP_VOID);
|
||||
tmp = RW (GPR (OP[1]));
|
||||
if ((addr & 1))
|
||||
{
|
||||
address_exception ();
|
||||
trace_output_void ();
|
||||
return;
|
||||
}
|
||||
tmp = RW (addr);
|
||||
SET_GPR (OP[0], tmp);
|
||||
if (OP[0] != OP[1])
|
||||
INC_ADDR (OP[1], 2);
|
||||
|
@ -1350,8 +1381,15 @@ void
|
|||
OP_6000 ()
|
||||
{
|
||||
uint16 tmp;
|
||||
uint16 addr = GPR (OP[1]);
|
||||
trace_input ("ld", OP_REG_OUTPUT, OP_MEMREF, OP_VOID);
|
||||
tmp = RW (GPR (OP[1]));
|
||||
if ((addr & 1))
|
||||
{
|
||||
address_exception ();
|
||||
trace_output_void ();
|
||||
return;
|
||||
}
|
||||
tmp = RW (addr);
|
||||
SET_GPR (OP[0], tmp);
|
||||
trace_output_16 (tmp);
|
||||
}
|
||||
|
@ -1361,9 +1399,15 @@ void
|
|||
OP_32010000 ()
|
||||
{
|
||||
uint16 tmp;
|
||||
|
||||
uint16 addr = OP[1];
|
||||
trace_input ("ld", OP_REG_OUTPUT, OP_MEMREF3, OP_VOID);
|
||||
tmp = RW (OP[1]);
|
||||
if ((addr & 1))
|
||||
{
|
||||
address_exception ();
|
||||
trace_output_void ();
|
||||
return;
|
||||
}
|
||||
tmp = RW (addr);
|
||||
SET_GPR (OP[0], tmp);
|
||||
trace_output_16 (tmp);
|
||||
}
|
||||
|
@ -1373,9 +1417,15 @@ void
|
|||
OP_31000000 ()
|
||||
{
|
||||
int32 tmp;
|
||||
uint16 addr = GPR (OP[2]);
|
||||
uint16 addr = OP[1] + GPR (OP[2]);
|
||||
trace_input ("ld2w", OP_REG_OUTPUT, OP_MEMREF2, OP_VOID);
|
||||
tmp = RLW (OP[1] + addr);
|
||||
if ((addr & 1))
|
||||
{
|
||||
address_exception ();
|
||||
trace_output_void ();
|
||||
return;
|
||||
}
|
||||
tmp = RLW (addr);
|
||||
SET_GPR32 (OP[0], tmp);
|
||||
trace_output_32 (tmp);
|
||||
}
|
||||
|
@ -1387,6 +1437,12 @@ OP_6601 ()
|
|||
uint16 addr = GPR (OP[1]);
|
||||
int32 tmp;
|
||||
trace_input ("ld2w", OP_REG_OUTPUT, OP_POSTDEC, OP_VOID);
|
||||
if ((addr & 1))
|
||||
{
|
||||
address_exception ();
|
||||
trace_output_void ();
|
||||
return;
|
||||
}
|
||||
tmp = RLW (addr);
|
||||
SET_GPR32 (OP[0], tmp);
|
||||
if (OP[0] != OP[1] && ((OP[0] + 1) != OP[1]))
|
||||
|
@ -1401,6 +1457,12 @@ OP_6201 ()
|
|||
int32 tmp;
|
||||
uint16 addr = GPR (OP[1]);
|
||||
trace_input ("ld2w", OP_REG_OUTPUT, OP_POSTINC, OP_VOID);
|
||||
if ((addr & 1))
|
||||
{
|
||||
address_exception ();
|
||||
trace_output_void ();
|
||||
return;
|
||||
}
|
||||
tmp = RLW (addr);
|
||||
SET_GPR32 (OP[0], tmp);
|
||||
if (OP[0] != OP[1] && ((OP[0] + 1) != OP[1]))
|
||||
|
@ -1415,7 +1477,13 @@ OP_6200 ()
|
|||
uint16 addr = GPR (OP[1]);
|
||||
int32 tmp;
|
||||
trace_input ("ld2w", OP_REG_OUTPUT, OP_MEMREF, OP_VOID);
|
||||
tmp = RLW (addr + 0);
|
||||
if ((addr & 1))
|
||||
{
|
||||
address_exception ();
|
||||
trace_output_void ();
|
||||
return;
|
||||
}
|
||||
tmp = RLW (addr);
|
||||
SET_GPR32 (OP[0], tmp);
|
||||
trace_output_32 (tmp);
|
||||
}
|
||||
|
@ -1425,9 +1493,15 @@ void
|
|||
OP_33010000 ()
|
||||
{
|
||||
int32 tmp;
|
||||
|
||||
uint16 addr = OP[1];
|
||||
trace_input ("ld2w", OP_REG_OUTPUT, OP_MEMREF3, OP_VOID);
|
||||
tmp = RLW (OP[1]);
|
||||
if ((addr & 1))
|
||||
{
|
||||
address_exception ();
|
||||
trace_output_void ();
|
||||
return;
|
||||
}
|
||||
tmp = RLW (addr);
|
||||
SET_GPR32 (OP[0], tmp);
|
||||
trace_output_32 (tmp);
|
||||
}
|
||||
|
@ -2663,8 +2737,15 @@ OP_4609 ()
|
|||
void
|
||||
OP_34000000 ()
|
||||
{
|
||||
uint16 addr = OP[1] + GPR (OP[2]);
|
||||
trace_input ("st", OP_REG, OP_MEMREF2, OP_VOID);
|
||||
SW (OP[1] + GPR (OP[2]), GPR (OP[0]));
|
||||
if ((addr & 1))
|
||||
{
|
||||
address_exception ();
|
||||
trace_output_void ();
|
||||
return;
|
||||
}
|
||||
SW (addr, GPR (OP[0]));
|
||||
trace_output_void ();
|
||||
}
|
||||
|
||||
|
@ -2672,12 +2753,20 @@ OP_34000000 ()
|
|||
void
|
||||
OP_6800 ()
|
||||
{
|
||||
uint16 addr = GPR (OP[1]);
|
||||
trace_input ("st", OP_REG, OP_MEMREF, OP_VOID);
|
||||
SW (GPR (OP[1]), GPR (OP[0]));
|
||||
if ((addr & 1))
|
||||
{
|
||||
address_exception ();
|
||||
trace_output_void ();
|
||||
return;
|
||||
}
|
||||
SW (addr, GPR (OP[0]));
|
||||
trace_output_void ();
|
||||
}
|
||||
|
||||
/* st */
|
||||
/* st Rsrc1,@-SP */
|
||||
void
|
||||
OP_6C1F ()
|
||||
{
|
||||
|
@ -2689,6 +2778,12 @@ OP_6C1F ()
|
|||
State.exception = SIGILL;
|
||||
return;
|
||||
}
|
||||
if ((addr & 1))
|
||||
{
|
||||
address_exception ();
|
||||
trace_output_void ();
|
||||
return;
|
||||
}
|
||||
SW (addr, GPR (OP[0]));
|
||||
SET_GPR (OP[1], addr);
|
||||
trace_output_void ();
|
||||
|
@ -2698,8 +2793,15 @@ OP_6C1F ()
|
|||
void
|
||||
OP_6801 ()
|
||||
{
|
||||
uint16 addr = GPR (OP[1]);
|
||||
trace_input ("st", OP_REG, OP_POSTINC, OP_VOID);
|
||||
SW (GPR (OP[1]), GPR (OP[0]));
|
||||
if ((addr & 1))
|
||||
{
|
||||
address_exception ();
|
||||
trace_output_void ();
|
||||
return;
|
||||
}
|
||||
SW (addr, GPR (OP[0]));
|
||||
INC_ADDR (OP[1], 2);
|
||||
trace_output_void ();
|
||||
}
|
||||
|
@ -2708,6 +2810,7 @@ OP_6801 ()
|
|||
void
|
||||
OP_6C01 ()
|
||||
{
|
||||
uint16 addr = GPR (OP[1]);
|
||||
trace_input ("st", OP_REG, OP_POSTDEC, OP_VOID);
|
||||
if ( OP[1] == 15 )
|
||||
{
|
||||
|
@ -2715,7 +2818,13 @@ OP_6C01 ()
|
|||
State.exception = SIGILL;
|
||||
return;
|
||||
}
|
||||
SW (GPR (OP[1]), GPR (OP[0]));
|
||||
if ((addr & 1))
|
||||
{
|
||||
address_exception ();
|
||||
trace_output_void ();
|
||||
return;
|
||||
}
|
||||
SW (addr, GPR (OP[0]));
|
||||
INC_ADDR (OP[1], -2);
|
||||
trace_output_void ();
|
||||
}
|
||||
|
@ -2724,8 +2833,15 @@ OP_6C01 ()
|
|||
void
|
||||
OP_36010000 ()
|
||||
{
|
||||
uint16 addr = OP[1];
|
||||
trace_input ("st", OP_REG, OP_MEMREF3, OP_VOID);
|
||||
SW (OP[1], GPR (OP[0]));
|
||||
if ((addr & 1))
|
||||
{
|
||||
address_exception ();
|
||||
trace_output_void ();
|
||||
return;
|
||||
}
|
||||
SW (addr, GPR (OP[0]));
|
||||
trace_output_void ();
|
||||
}
|
||||
|
||||
|
@ -2733,9 +2849,16 @@ OP_36010000 ()
|
|||
void
|
||||
OP_35000000 ()
|
||||
{
|
||||
uint16 addr = GPR (OP[2])+ OP[1];
|
||||
trace_input ("st2w", OP_DREG, OP_MEMREF2, OP_VOID);
|
||||
SW (GPR (OP[2])+ OP[1] + 0, GPR (OP[0] + 0));
|
||||
SW (GPR (OP[2])+ OP[1] + 2, GPR (OP[0] + 1));
|
||||
if ((addr & 1))
|
||||
{
|
||||
address_exception ();
|
||||
trace_output_void ();
|
||||
return;
|
||||
}
|
||||
SW (addr + 0, GPR (OP[0] + 0));
|
||||
SW (addr + 2, GPR (OP[0] + 1));
|
||||
trace_output_void ();
|
||||
}
|
||||
|
||||
|
@ -2743,9 +2866,16 @@ OP_35000000 ()
|
|||
void
|
||||
OP_6A00 ()
|
||||
{
|
||||
uint16 addr = GPR (OP[1]);
|
||||
trace_input ("st2w", OP_DREG, OP_MEMREF, OP_VOID);
|
||||
SW (GPR (OP[1]) + 0, GPR (OP[0] + 0));
|
||||
SW (GPR (OP[1]) + 2, GPR (OP[0] + 1));
|
||||
if ((addr & 1))
|
||||
{
|
||||
address_exception ();
|
||||
trace_output_void ();
|
||||
return;
|
||||
}
|
||||
SW (addr + 0, GPR (OP[0] + 0));
|
||||
SW (addr + 2, GPR (OP[0] + 1));
|
||||
trace_output_void ();
|
||||
}
|
||||
|
||||
|
@ -2761,6 +2891,12 @@ OP_6E1F ()
|
|||
State.exception = SIGILL;
|
||||
return;
|
||||
}
|
||||
if ((addr & 1))
|
||||
{
|
||||
address_exception ();
|
||||
trace_output_void ();
|
||||
return;
|
||||
}
|
||||
SW (addr + 0, GPR (OP[0] + 0));
|
||||
SW (addr + 2, GPR (OP[0] + 1));
|
||||
SET_GPR (OP[1], addr);
|
||||
|
@ -2771,9 +2907,16 @@ OP_6E1F ()
|
|||
void
|
||||
OP_6A01 ()
|
||||
{
|
||||
uint16 addr = GPR (OP[1]);
|
||||
trace_input ("st2w", OP_DREG, OP_POSTINC, OP_VOID);
|
||||
SW (GPR (OP[1]) + 0, GPR (OP[0] + 0));
|
||||
SW (GPR (OP[1]) + 2, GPR (OP[0] + 1));
|
||||
if ((addr & 1))
|
||||
{
|
||||
address_exception ();
|
||||
trace_output_void ();
|
||||
return;
|
||||
}
|
||||
SW (addr + 0, GPR (OP[0] + 0));
|
||||
SW (addr + 2, GPR (OP[0] + 1));
|
||||
INC_ADDR (OP[1], 4);
|
||||
trace_output_void ();
|
||||
}
|
||||
|
@ -2782,6 +2925,7 @@ OP_6A01 ()
|
|||
void
|
||||
OP_6E01 ()
|
||||
{
|
||||
uint16 addr = GPR (OP[1]);
|
||||
trace_input ("st2w", OP_DREG, OP_POSTDEC, OP_VOID);
|
||||
if ( OP[1] == 15 )
|
||||
{
|
||||
|
@ -2789,8 +2933,14 @@ OP_6E01 ()
|
|||
State.exception = SIGILL;
|
||||
return;
|
||||
}
|
||||
SW (GPR (OP[1]) + 0, GPR (OP[0] + 0));
|
||||
SW (GPR (OP[1]) + 2, GPR (OP[0] + 1));
|
||||
if ((addr & 1))
|
||||
{
|
||||
address_exception ();
|
||||
trace_output_void ();
|
||||
return;
|
||||
}
|
||||
SW (addr + 0, GPR (OP[0] + 0));
|
||||
SW (addr + 2, GPR (OP[0] + 1));
|
||||
INC_ADDR (OP[1], -4);
|
||||
trace_output_void ();
|
||||
}
|
||||
|
@ -2799,9 +2949,16 @@ OP_6E01 ()
|
|||
void
|
||||
OP_37010000 ()
|
||||
{
|
||||
uint16 addr = OP[1];
|
||||
trace_input ("st2w", OP_DREG, OP_MEMREF3, OP_VOID);
|
||||
SW (OP [1] + 0, GPR (OP[0] + 0));
|
||||
SW (OP [1] + 2, GPR (OP[0] + 1));
|
||||
if ((addr & 1))
|
||||
{
|
||||
address_exception ();
|
||||
trace_output_void ();
|
||||
return;
|
||||
}
|
||||
SW (addr + 0, GPR (OP[0] + 0));
|
||||
SW (addr + 2, GPR (OP[0] + 1));
|
||||
trace_output_void ();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,15 @@
|
|||
Mon Jan 3 00:17:28 2000 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* t-ae-ld-d.s, t-ae-ld-i.s, t-ae-ld-id.s, t-ae-ld-im.s ,
|
||||
t-ae-ld-ip.s, t-ae-ld2w-d.s, t-ae-ld2w-i.s, t-ae-ld2w-id.s ,
|
||||
t-ae-ld2w-im.s, t-ae-ld2w-ip.s, t-ae-st-d.s, t-ae-st-i.s ,
|
||||
t-ae-st-id.s, t-ae-st-im.s, t-ae-st-ip.s, t-ae-st-is.s ,
|
||||
t-ae-st2w-d.s, t-ae-st2w-i.s, t-ae-st2w-id.s, t-ae-st2w-im.s ,
|
||||
t-ae-st2w-ip.s, t-ae-st2w-is.s: New tests. Check that an address
|
||||
exception occures when a word/two-word load/store is not word
|
||||
aligned.
|
||||
* Makefile.in (TESTS): Update.
|
||||
|
||||
Fri Oct 29 18:36:34 1999 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* t-mvtc.s: Check that the user can not modify the DM bit in the
|
||||
|
|
|
@ -60,6 +60,29 @@ TESTS = \
|
|||
t-sub2w.ok \
|
||||
t-sub.ok \
|
||||
t-subi.ok \
|
||||
t-ae-ld-d.ok \
|
||||
t-ae-ld-i.ok \
|
||||
t-ae-ld-id.ok \
|
||||
t-ae-ld-im.ok \
|
||||
t-ae-ld-ip.ok \
|
||||
t-ae-ld2w-d.ok \
|
||||
t-ae-ld2w-i.ok \
|
||||
t-ae-ld2w-id.ok \
|
||||
t-ae-ld2w-im.ok \
|
||||
t-ae-ld2w-ip.ok \
|
||||
t-ae-st-d.ok \
|
||||
t-ae-st-i.ok \
|
||||
t-ae-st-id.ok \
|
||||
t-ae-st-im.ok \
|
||||
t-ae-st-ip.ok \
|
||||
t-ae-st-is.ok \
|
||||
t-ae-st2w-d.ok \
|
||||
t-ae-st2w-i.ok \
|
||||
t-ae-st2w-id.ok \
|
||||
t-ae-st2w-im.ok \
|
||||
t-ae-st2w-ip.ok \
|
||||
t-ae-st2w-is.ok \
|
||||
t-mod-ld-pre.ok \
|
||||
#
|
||||
|
||||
AS_FOR_TARGET = `\
|
||||
|
|
13
sim/testsuite/d10v-elf/t-ae-ld-d.s
Normal file
13
sim/testsuite/d10v-elf/t-ae-ld-d.s
Normal file
|
@ -0,0 +1,13 @@
|
|||
.include "t-macros.i"
|
||||
|
||||
start
|
||||
|
||||
PSW_BITS = 0
|
||||
point_dmap_at_imem
|
||||
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld
|
||||
|
||||
ld r8,@0x4000
|
||||
test_ld:
|
||||
ld r8,@0x4001
|
||||
nop
|
||||
exit47
|
16
sim/testsuite/d10v-elf/t-ae-ld-i.s
Normal file
16
sim/testsuite/d10v-elf/t-ae-ld-i.s
Normal file
|
@ -0,0 +1,16 @@
|
|||
.include "t-macros.i"
|
||||
|
||||
start
|
||||
|
||||
PSW_BITS = 0
|
||||
point_dmap_at_imem
|
||||
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld
|
||||
|
||||
ldi r10, #0x4000
|
||||
ld r8, @r10
|
||||
|
||||
ldi r10, #0x4001
|
||||
test_ld:
|
||||
ld r8,@r10
|
||||
nop
|
||||
exit47
|
15
sim/testsuite/d10v-elf/t-ae-ld-id.s
Normal file
15
sim/testsuite/d10v-elf/t-ae-ld-id.s
Normal file
|
@ -0,0 +1,15 @@
|
|||
.include "t-macros.i"
|
||||
|
||||
start
|
||||
|
||||
PSW_BITS = 0
|
||||
point_dmap_at_imem
|
||||
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld
|
||||
|
||||
ldi r10, #0x4001
|
||||
ld r8, @(1,r10)
|
||||
|
||||
test_ld:
|
||||
ld r8,@(2,r10)
|
||||
nop
|
||||
exit47
|
16
sim/testsuite/d10v-elf/t-ae-ld-im.s
Normal file
16
sim/testsuite/d10v-elf/t-ae-ld-im.s
Normal file
|
@ -0,0 +1,16 @@
|
|||
.include "t-macros.i"
|
||||
|
||||
start
|
||||
|
||||
PSW_BITS = 0
|
||||
point_dmap_at_imem
|
||||
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld
|
||||
|
||||
ldi r10, #0x4000
|
||||
ld r8, @r10-
|
||||
|
||||
ldi r10, #0x4001
|
||||
test_ld:
|
||||
ld r8,@r10-
|
||||
nop
|
||||
exit47
|
16
sim/testsuite/d10v-elf/t-ae-ld-ip.s
Normal file
16
sim/testsuite/d10v-elf/t-ae-ld-ip.s
Normal file
|
@ -0,0 +1,16 @@
|
|||
.include "t-macros.i"
|
||||
|
||||
start
|
||||
|
||||
PSW_BITS = 0
|
||||
point_dmap_at_imem
|
||||
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld
|
||||
|
||||
ldi r10, #0x4000
|
||||
ld r8, @r10+
|
||||
|
||||
ldi r10, #0x4001
|
||||
test_ld:
|
||||
ld r8,@r10+
|
||||
nop
|
||||
exit47
|
13
sim/testsuite/d10v-elf/t-ae-ld2w-d.s
Normal file
13
sim/testsuite/d10v-elf/t-ae-ld2w-d.s
Normal file
|
@ -0,0 +1,13 @@
|
|||
.include "t-macros.i"
|
||||
|
||||
start
|
||||
|
||||
PSW_BITS = 0
|
||||
point_dmap_at_imem
|
||||
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld2w
|
||||
|
||||
ld2w r8,@0x4000
|
||||
test_ld2w:
|
||||
ld2w r8,@0x4001
|
||||
nop
|
||||
exit47
|
16
sim/testsuite/d10v-elf/t-ae-ld2w-i.s
Normal file
16
sim/testsuite/d10v-elf/t-ae-ld2w-i.s
Normal file
|
@ -0,0 +1,16 @@
|
|||
.include "t-macros.i"
|
||||
|
||||
start
|
||||
|
||||
PSW_BITS = 0
|
||||
point_dmap_at_imem
|
||||
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld2w
|
||||
|
||||
ldi r10, #0x4000
|
||||
ld2w r8, @r10
|
||||
|
||||
ldi r10, #0x4001
|
||||
test_ld2w:
|
||||
ld2w r8,@r10
|
||||
nop
|
||||
exit47
|
14
sim/testsuite/d10v-elf/t-ae-ld2w-id.s
Normal file
14
sim/testsuite/d10v-elf/t-ae-ld2w-id.s
Normal file
|
@ -0,0 +1,14 @@
|
|||
.include "t-macros.i"
|
||||
|
||||
start
|
||||
|
||||
PSW_BITS = 0
|
||||
point_dmap_at_imem
|
||||
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld2w
|
||||
|
||||
ldi r10, #0x4001
|
||||
ld2w r8,@(1,r10)
|
||||
test_ld2w:
|
||||
ld2w r8,@(2,r10)
|
||||
nop
|
||||
exit47
|
16
sim/testsuite/d10v-elf/t-ae-ld2w-im.s
Normal file
16
sim/testsuite/d10v-elf/t-ae-ld2w-im.s
Normal file
|
@ -0,0 +1,16 @@
|
|||
.include "t-macros.i"
|
||||
|
||||
start
|
||||
|
||||
PSW_BITS = 0
|
||||
point_dmap_at_imem
|
||||
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld2w
|
||||
|
||||
ldi r10, #0x4000
|
||||
ld2w r8, @r10-
|
||||
|
||||
ldi r10, #0x4001
|
||||
test_ld2w:
|
||||
ld2w r8,@r10-
|
||||
nop
|
||||
exit47
|
16
sim/testsuite/d10v-elf/t-ae-ld2w-ip.s
Normal file
16
sim/testsuite/d10v-elf/t-ae-ld2w-ip.s
Normal file
|
@ -0,0 +1,16 @@
|
|||
.include "t-macros.i"
|
||||
|
||||
start
|
||||
|
||||
PSW_BITS = 0
|
||||
point_dmap_at_imem
|
||||
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_ld2w
|
||||
|
||||
ldi r10, #0x4000
|
||||
ld2w r8, @r10+
|
||||
|
||||
ldi r10, #0x4001
|
||||
test_ld2w:
|
||||
ld2w r8,@r10+
|
||||
nop
|
||||
exit47
|
13
sim/testsuite/d10v-elf/t-ae-st-d.s
Normal file
13
sim/testsuite/d10v-elf/t-ae-st-d.s
Normal file
|
@ -0,0 +1,13 @@
|
|||
.include "t-macros.i"
|
||||
|
||||
start
|
||||
|
||||
PSW_BITS = 0
|
||||
point_dmap_at_imem
|
||||
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st
|
||||
|
||||
st r8,@0x4000
|
||||
test_st:
|
||||
st r8,@0x4001
|
||||
nop
|
||||
exit47
|
16
sim/testsuite/d10v-elf/t-ae-st-i.s
Normal file
16
sim/testsuite/d10v-elf/t-ae-st-i.s
Normal file
|
@ -0,0 +1,16 @@
|
|||
.include "t-macros.i"
|
||||
|
||||
start
|
||||
|
||||
PSW_BITS = 0
|
||||
point_dmap_at_imem
|
||||
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st
|
||||
|
||||
ldi r10,#0x4000
|
||||
st r8, @r10
|
||||
|
||||
ldi r10,#0x4001
|
||||
test_st:
|
||||
st r8,@r10
|
||||
nop
|
||||
exit47
|
14
sim/testsuite/d10v-elf/t-ae-st-id.s
Normal file
14
sim/testsuite/d10v-elf/t-ae-st-id.s
Normal file
|
@ -0,0 +1,14 @@
|
|||
.include "t-macros.i"
|
||||
|
||||
start
|
||||
|
||||
PSW_BITS = 0
|
||||
point_dmap_at_imem
|
||||
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st
|
||||
|
||||
ldi r10,#0x4001
|
||||
st r8, @(1,r10)
|
||||
test_st:
|
||||
st r8,@(2,r10)
|
||||
nop
|
||||
exit47
|
16
sim/testsuite/d10v-elf/t-ae-st-im.s
Normal file
16
sim/testsuite/d10v-elf/t-ae-st-im.s
Normal file
|
@ -0,0 +1,16 @@
|
|||
.include "t-macros.i"
|
||||
|
||||
start
|
||||
|
||||
PSW_BITS = 0
|
||||
point_dmap_at_imem
|
||||
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st
|
||||
|
||||
ldi r10,#0x4000
|
||||
st r8, @r10-
|
||||
|
||||
ldi r10,#0x4001
|
||||
test_st:
|
||||
st r8,@r10-
|
||||
nop
|
||||
exit47
|
16
sim/testsuite/d10v-elf/t-ae-st-ip.s
Normal file
16
sim/testsuite/d10v-elf/t-ae-st-ip.s
Normal file
|
@ -0,0 +1,16 @@
|
|||
.include "t-macros.i"
|
||||
|
||||
start
|
||||
|
||||
PSW_BITS = 0
|
||||
point_dmap_at_imem
|
||||
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st
|
||||
|
||||
ldi r10,#0x4000
|
||||
st r8, @r10+
|
||||
|
||||
ldi r10,#0x4001
|
||||
test_st:
|
||||
st r8,@r10+
|
||||
nop
|
||||
exit47
|
16
sim/testsuite/d10v-elf/t-ae-st-is.s
Normal file
16
sim/testsuite/d10v-elf/t-ae-st-is.s
Normal file
|
@ -0,0 +1,16 @@
|
|||
.include "t-macros.i"
|
||||
|
||||
start
|
||||
|
||||
PSW_BITS = 0
|
||||
point_dmap_at_imem
|
||||
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st
|
||||
|
||||
ldi sp,#0x4000
|
||||
st r8, @-SP
|
||||
|
||||
ldi sp,#0x4001
|
||||
test_st:
|
||||
st r8,@-SP
|
||||
nop
|
||||
exit47
|
13
sim/testsuite/d10v-elf/t-ae-st2w-d.s
Normal file
13
sim/testsuite/d10v-elf/t-ae-st2w-d.s
Normal file
|
@ -0,0 +1,13 @@
|
|||
.include "t-macros.i"
|
||||
|
||||
start
|
||||
|
||||
PSW_BITS = 0
|
||||
point_dmap_at_imem
|
||||
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st2w
|
||||
|
||||
st2w r8,@0x4000
|
||||
test_st2w:
|
||||
st2w r8,@0x4001
|
||||
nop
|
||||
exit47
|
16
sim/testsuite/d10v-elf/t-ae-st2w-i.s
Normal file
16
sim/testsuite/d10v-elf/t-ae-st2w-i.s
Normal file
|
@ -0,0 +1,16 @@
|
|||
.include "t-macros.i"
|
||||
|
||||
start
|
||||
|
||||
PSW_BITS = 0
|
||||
point_dmap_at_imem
|
||||
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st2w
|
||||
|
||||
ldi r10, #0x4000
|
||||
st2w r8, @r10
|
||||
|
||||
ldi r10, #0x4001
|
||||
test_st2w:
|
||||
st2w r8,@r10
|
||||
nop
|
||||
exit47
|
14
sim/testsuite/d10v-elf/t-ae-st2w-id.s
Normal file
14
sim/testsuite/d10v-elf/t-ae-st2w-id.s
Normal file
|
@ -0,0 +1,14 @@
|
|||
.include "t-macros.i"
|
||||
|
||||
start
|
||||
|
||||
PSW_BITS = 0
|
||||
point_dmap_at_imem
|
||||
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st2w
|
||||
|
||||
ldi r10, #0x4001
|
||||
st2w r8, @(1,r10)
|
||||
test_st2w:
|
||||
st2w r8,@(2,r10)
|
||||
nop
|
||||
exit47
|
16
sim/testsuite/d10v-elf/t-ae-st2w-im.s
Normal file
16
sim/testsuite/d10v-elf/t-ae-st2w-im.s
Normal file
|
@ -0,0 +1,16 @@
|
|||
.include "t-macros.i"
|
||||
|
||||
start
|
||||
|
||||
PSW_BITS = 0
|
||||
point_dmap_at_imem
|
||||
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st2w
|
||||
|
||||
ldi r10, #0x4000
|
||||
st2w r8, @r10-
|
||||
|
||||
ldi r10, #0x4001
|
||||
test_st2w:
|
||||
st2w r8,@r10-
|
||||
nop
|
||||
exit47
|
16
sim/testsuite/d10v-elf/t-ae-st2w-ip.s
Normal file
16
sim/testsuite/d10v-elf/t-ae-st2w-ip.s
Normal file
|
@ -0,0 +1,16 @@
|
|||
.include "t-macros.i"
|
||||
|
||||
start
|
||||
|
||||
PSW_BITS = 0
|
||||
point_dmap_at_imem
|
||||
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st2w
|
||||
|
||||
ldi r10, #0x4000
|
||||
st2w r8, @r10+
|
||||
|
||||
ldi r10, #0x4001
|
||||
test_st2w:
|
||||
st2w r8,@r10+
|
||||
nop
|
||||
exit47
|
16
sim/testsuite/d10v-elf/t-ae-st2w-is.s
Normal file
16
sim/testsuite/d10v-elf/t-ae-st2w-is.s
Normal file
|
@ -0,0 +1,16 @@
|
|||
.include "t-macros.i"
|
||||
|
||||
start
|
||||
|
||||
PSW_BITS = 0
|
||||
point_dmap_at_imem
|
||||
check_interrupt (VEC_AE&DMAP_MASK)+DMAP_BASE PSW_BITS test_st2w
|
||||
|
||||
ldi sp, #0x4004
|
||||
st2w r8, @-SP
|
||||
|
||||
ldi sp, #0x4005
|
||||
test_st2w:
|
||||
st2w r8,@-SP
|
||||
nop
|
||||
exit47
|
|
@ -21,6 +21,20 @@ _start:
|
|||
.endm
|
||||
|
||||
|
||||
.macro exit1
|
||||
ldi r4, 1
|
||||
ldi r0, 1
|
||||
trap 15
|
||||
.endm
|
||||
|
||||
|
||||
.macro exit2
|
||||
ldi r4, 1
|
||||
ldi r0, 2
|
||||
trap 15
|
||||
.endm
|
||||
|
||||
|
||||
.macro load reg val
|
||||
ldi \reg, #\val
|
||||
.endm
|
||||
|
@ -128,6 +142,53 @@ _start:
|
|||
.endm
|
||||
|
||||
|
||||
;;; Blat our DMAP registers so that they point at on-chip imem
|
||||
.macro point_dmap_at_imem
|
||||
.text
|
||||
ldi r2, MAP_INSN | 0xf
|
||||
st r2, @(DMAP_REG,r0)
|
||||
ldi r2, MAP_INSN
|
||||
st r2, @(IMAP1_REG,r0)
|
||||
.endm
|
||||
|
||||
;;; Patch VEC so that it jumps back to code that checks PSW
|
||||
;;; and then exits with success.
|
||||
.macro check_interrupt vec psw src
|
||||
;;; Patch the interrupt vector's AE entry with a jmp to success
|
||||
.text
|
||||
ldi r4, #1f
|
||||
ldi r5, \vec
|
||||
;;
|
||||
ld2w r2, @(0,r4)
|
||||
st2w r2, @(0,r5)
|
||||
ld2w r2, @(4,r4)
|
||||
st2w r2, @(4,r5)
|
||||
;;
|
||||
bra 9f
|
||||
nop
|
||||
;;; Code that gets patched into the interrupt vector
|
||||
.data
|
||||
1: ldi r1, 2f@word
|
||||
jmp r1
|
||||
;;; Successfull trap jumps back to here
|
||||
.text
|
||||
;;; Verify the PSW
|
||||
2: mvfc r2, cr0
|
||||
cmpeqi r2, #\psw
|
||||
brf0t 3f
|
||||
nop
|
||||
exit1
|
||||
;;; Verify the original addr
|
||||
3: mvfc r2, bpc
|
||||
cmpeqi r2, #\src@word
|
||||
brf0t 4f
|
||||
exit2
|
||||
4: exit0
|
||||
;;; continue as normal
|
||||
9:
|
||||
.endm
|
||||
|
||||
|
||||
PSW_SM = 0x8000
|
||||
PSW_01 = 0x4000
|
||||
PSW_EA = 0x2000
|
||||
|
@ -159,12 +220,14 @@ _start:
|
|||
|
||||
;;;
|
||||
|
||||
VEC_RI = 0x3fc00
|
||||
VEC_BAE = 0x3fc04
|
||||
VEC_RIE = 0x3fc08
|
||||
VEC_AE = 0x3fc0c
|
||||
VEC_TRAP = 0x3fc10
|
||||
VEC_RI = 0x3ff00
|
||||
VEC_BAE = 0x3ff04
|
||||
VEC_RIE = 0x3ff08
|
||||
VEC_AE = 0x3ff0c
|
||||
VEC_TRAP = 0x3ff10
|
||||
VEC_DBT = 0x3ff50
|
||||
VEC_SDBT = 0x3fff4
|
||||
VEC_DBI = 0x3ff58
|
||||
VEC_EI = 0x3ff5c
|
||||
|
||||
|
||||
|
|
126
sim/testsuite/d10v-elf/t-mod-ld-pre.s
Normal file
126
sim/testsuite/d10v-elf/t-mod-ld-pre.s
Normal file
|
@ -0,0 +1,126 @@
|
|||
.include "t-macros.i"
|
||||
|
||||
.section .rodata
|
||||
|
||||
.text
|
||||
.globl main
|
||||
.type main,@function
|
||||
main:
|
||||
mvfc r0, PSW || ldi.s r14, #0
|
||||
ldi.l r2, 0x100 ; MOD_E
|
||||
ldi.l r3, 0x108 ; MOD_S
|
||||
|
||||
test_mod_dec_ld:
|
||||
mvtc r2, MOD_E || bseti r0, #7
|
||||
mvtc r3, MOD_S
|
||||
mvtc r0, PSW ; modulo mode enable
|
||||
mv r1,r3 ; r1=0x108
|
||||
ld r4, @r1- || nop ; r1=0x106
|
||||
ld r4, @r1- || nop ; r1=0x104
|
||||
ld r4, @r1- || nop ; r1=0x102
|
||||
ld r4, @r1- || nop ; r1=0x100
|
||||
ld r4, @r1- || nop ; r1=0x108
|
||||
ld r4, @r1- || nop ; r1=0x106
|
||||
|
||||
cmpeqi r1,#0x106
|
||||
brf0f _ERR ; branch to error
|
||||
|
||||
test_mod_inc_ld:
|
||||
mvtc r2, MOD_S
|
||||
mvtc r3, MOD_E
|
||||
mv r1,r2 ; r1=0x100
|
||||
ld r4, @r1+ || nop ; r1=0x102
|
||||
ld r4, @r1+ || nop ; r1=0x104
|
||||
ld r4, @r1+ || nop ; r1=0x106
|
||||
ld r4, @r1+ || nop ; r1=0x108
|
||||
ld r4, @r1+ || nop ; r1=0x100
|
||||
ld r4, @r1+ || nop ; r1=0x102
|
||||
|
||||
cmpeqi r1,#0x102
|
||||
brf0f _ERR
|
||||
|
||||
test_mod_dec_ld2w:
|
||||
mvtc r2, MOD_E
|
||||
mvtc r3, MOD_S
|
||||
mv r1,r3 ; r1=0x108
|
||||
ld2W r4, @r1- || nop ; r1=0x104
|
||||
ld2W r4, @r1- || nop ; r1=0x100
|
||||
ld2W r4, @r1- || nop ; r1=0x108
|
||||
ld2W r4, @r1- || nop ; r1=0x104
|
||||
|
||||
cmpeqi r1,#0x104
|
||||
brf0f _ERR ; <= branch to error
|
||||
|
||||
test_mod_inc_ld2w:
|
||||
mvtc r2, MOD_S
|
||||
mvtc r3, MOD_E || BCLRI r0, #7
|
||||
mv r1,r2 ; r1=0x100
|
||||
ld2W r4, @r1+ || nop ; r1=0x104
|
||||
ld2W r4, @r1+ || nop ; r1=0x108
|
||||
ld2W r4, @r1+ || nop ; r1=0x100
|
||||
ld2W r4, @r1+ || nop ; r1=0x104
|
||||
|
||||
cmpeqi r1,#0x104
|
||||
brf0f _ERR
|
||||
|
||||
test_mod_dec_ld_dis:
|
||||
mvtc r0, PSW ; modulo mode disable
|
||||
mvtc r2, MOD_E
|
||||
mvtc r3, MOD_S
|
||||
mv r1,r3 ; r1=0x108
|
||||
ld r4, @r1- || nop ; r1=0x106
|
||||
ld r4, @r1- || nop ; r1=0x104
|
||||
ld r4, @r1- || nop ; r1=0x102
|
||||
ld r4, @r1- || nop ; r1=0x100
|
||||
ld r4, @r1- || nop ; r1=0xFE
|
||||
ld r4, @r1- || nop ; r1=0xFC
|
||||
|
||||
cmpeqi r1,#0xFC
|
||||
brf0f _ERR
|
||||
|
||||
test_mod_inc_ld_dis:
|
||||
mvtc r2, MOD_S
|
||||
mvtc r3, MOD_E
|
||||
mv r1,r2 ; r1=0x100
|
||||
ld r4, @r1+ || nop ; r1=0x102
|
||||
ld r4, @r1+ || nop ; r1=0x104
|
||||
ld r4, @r1+ || nop ; r1=0x106
|
||||
ld r4, @r1+ || nop ; r1=0x108
|
||||
ld r4, @r1+ || nop ; r1=0x10A
|
||||
ld r4, @r1+ || nop ; r1=0x10C
|
||||
|
||||
cmpeqi r1,#0x10C
|
||||
brf0f _ERR
|
||||
|
||||
test_mod_dec_ld2w_dis:
|
||||
mvtc r2, MOD_E
|
||||
mvtc r3, MOD_S
|
||||
mv r1,r3 ; r1=0x108
|
||||
ld2W r4, @r1- || nop ; r1=0x104
|
||||
ld2W r4, @r1- || nop ; r1=0x100
|
||||
ld2W r4, @r1- || nop ; r1=0xFC
|
||||
ld2W r4, @r1- || nop ; r1=0xF8
|
||||
|
||||
cmpeqi r1,#0xF8
|
||||
brf0f _ERR
|
||||
|
||||
test_mod_inc_ld2w_dis:
|
||||
mvtc r2, MOD_S
|
||||
mvtc r3, MOD_E
|
||||
mv r1,r2 ; r1=0x100
|
||||
ld2W r4, @r1+ || nop ; r1=0x104
|
||||
ld2W r4, @r1+ || nop ; r1=0x108
|
||||
ld2W r4, @r1+ || nop ; r1=0x10C
|
||||
ld2W r4, @r1+ || nop ; r1=0x110
|
||||
|
||||
cmpeqi r1,#0x110
|
||||
brf0f _ERR
|
||||
|
||||
_OK:
|
||||
exit0
|
||||
|
||||
_ERR:
|
||||
exit47
|
||||
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue