mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:51:15 +08:00
Mon Jul 27 16:11:42 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
* tracepoint.c (remote_set_transparent_ranges): new function. Send the start and end addresses of all loadable read-only sections down to the trace target, so that it can treat them as "transparent" (ie. don't care if they were collected or not).
This commit is contained in:
parent
5ef103c0b9
commit
0745a748dd
@ -1,3 +1,10 @@
|
||||
Mon Jul 27 16:11:42 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
|
||||
|
||||
* tracepoint.c (remote_set_transparent_ranges): new function.
|
||||
Send the start and end addresses of all loadable read-only
|
||||
sections down to the trace target, so that it can treat them
|
||||
as "transparent" (ie. don't care if they were collected or not).
|
||||
|
||||
Mon Jul 27 15:38:07 1998 Mark Alexander <marka@cygnus.com>
|
||||
|
||||
* mn10300-tdep.c (mn10300_analyze_prologue): Undo previous fix
|
||||
|
@ -1616,9 +1616,50 @@ add_aexpr(collect, aexpr)
|
||||
collect->next_aexpr_elt++;
|
||||
}
|
||||
|
||||
|
||||
static char target_buf[2048];
|
||||
|
||||
/* Set "transparent" memory ranges
|
||||
|
||||
Allow trace mechanism to treat text-like sections
|
||||
(and perhaps all read-only sections) transparently,
|
||||
i.e. don't reject memory requests from these address ranges
|
||||
just because they haven't been collected. */
|
||||
|
||||
static void
|
||||
remote_set_transparent_ranges (void)
|
||||
{
|
||||
extern bfd *exec_bfd;
|
||||
asection *s;
|
||||
bfd_size_type size;
|
||||
bfd_vma lma;
|
||||
int anysecs = 0;
|
||||
|
||||
if (!exec_bfd)
|
||||
return; /* no information to give. */
|
||||
|
||||
strcpy (target_buf, "QTro");
|
||||
for (s = exec_bfd->sections; s; s = s->next)
|
||||
{
|
||||
char tmp[40];
|
||||
|
||||
if ((s->flags & SEC_LOAD) == 0 ||
|
||||
/* (s->flags & SEC_CODE) == 0 || */
|
||||
(s->flags & SEC_READONLY) == 0)
|
||||
continue;
|
||||
|
||||
anysecs = 1;
|
||||
lma = s->lma;
|
||||
size = bfd_get_section_size_before_reloc (s);
|
||||
sprintf (tmp, ":%x,%x", lma, lma + size);
|
||||
strcat (target_buf, tmp);
|
||||
}
|
||||
if (anysecs)
|
||||
{
|
||||
putpkt (target_buf);
|
||||
getpkt (target_buf, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/* tstart command:
|
||||
|
||||
Tell target to clear any previous trace experiment.
|
||||
@ -1707,6 +1748,9 @@ trace_start_command (args, from_tty)
|
||||
do_cleanups (old_chain);
|
||||
}
|
||||
}
|
||||
/* Tell target to treat text-like sections as transparent */
|
||||
remote_set_transparent_ranges ();
|
||||
/* Now insert traps and begin collecting data */
|
||||
putpkt ("QTStart");
|
||||
remote_get_noisy_reply (target_buf);
|
||||
if (strcmp (target_buf, "OK"))
|
||||
|
Loading…
Reference in New Issue
Block a user