mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 14:39:09 +08:00
Fri Jan 2 17:06:05 1998 Michael Snyder (msnyder@cleaver.cygnus.com)
* tracepoint.c (finish_tfind_command): improved algorithm for deciding when we've "stepped" into a new stack frame. (map_args_over_tracepoints): loop over tracepoint list "safely", since list elements may be deleted during loop. (read_actions): add actions to history list.
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
Fri Jan 2 17:06:05 1998 Michael Snyder (msnyder@cleaver.cygnus.com)
|
||||||
|
|
||||||
|
* tracepoint.c (finish_tfind_command): improved algorithm for
|
||||||
|
deciding when we've "stepped" into a new stack frame.
|
||||||
|
(map_args_over_tracepoints): loop over tracepoint list "safely",
|
||||||
|
since list elements may be deleted during loop.
|
||||||
|
(read_actions): add actions to history list.
|
||||||
|
|
||||||
Fri Jan 2 16:56:16 1998 Michael Snyder (msnyder@cleaver.cygnus.com)
|
Fri Jan 2 16:56:16 1998 Michael Snyder (msnyder@cleaver.cygnus.com)
|
||||||
[From Keith Seitz (kseitz@cygnus.com)]
|
[From Keith Seitz (kseitz@cygnus.com)]
|
||||||
|
|
||||||
|
@ -617,12 +617,12 @@ map_args_over_tracepoints (args, from_tty, opcode)
|
|||||||
int from_tty;
|
int from_tty;
|
||||||
enum tracepoint_opcode opcode;
|
enum tracepoint_opcode opcode;
|
||||||
{
|
{
|
||||||
struct tracepoint *t;
|
struct tracepoint *t, *tmp;
|
||||||
int tpnum;
|
int tpnum;
|
||||||
char *cp;
|
char *cp;
|
||||||
|
|
||||||
if (args == 0 || *args == 0) /* do them all */
|
if (args == 0 || *args == 0) /* do them all */
|
||||||
ALL_TRACEPOINTS (t)
|
ALL_TRACEPOINTS_SAFE (t, tmp)
|
||||||
tracepoint_operation (t, from_tty, opcode);
|
tracepoint_operation (t, from_tty, opcode);
|
||||||
else
|
else
|
||||||
while (*args)
|
while (*args)
|
||||||
@ -830,7 +830,11 @@ read_actions (t)
|
|||||||
if (readline_hook && instream == NULL)
|
if (readline_hook && instream == NULL)
|
||||||
line = (*readline_hook) (prompt);
|
line = (*readline_hook) (prompt);
|
||||||
else if (instream == stdin && ISATTY (instream))
|
else if (instream == stdin && ISATTY (instream))
|
||||||
|
{
|
||||||
line = readline (prompt);
|
line = readline (prompt);
|
||||||
|
if (line && *line) /* add it to command history */
|
||||||
|
add_history (line);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
line = gdb_readline (0);
|
line = gdb_readline (0);
|
||||||
|
|
||||||
@ -1708,8 +1712,20 @@ finish_tfind_command (msg, from_tty)
|
|||||||
{
|
{
|
||||||
int source_only;
|
int source_only;
|
||||||
|
|
||||||
if (old_frame_addr == FRAME_FP (get_current_frame ()) &&
|
/* NOTE: in immitation of the step command, try to determine
|
||||||
old_func == find_pc_function (read_pc ()))
|
whether we have made a transition from one function to another.
|
||||||
|
If so, we'll print the "stack frame" (ie. the new function and
|
||||||
|
it's arguments) -- otherwise we'll just show the new source line.
|
||||||
|
|
||||||
|
This determination is made by checking (1) whether the current
|
||||||
|
function has changed, and (2) whether the current FP has changed.
|
||||||
|
Hack: if the FP wasn't collected, either at the current or the
|
||||||
|
previous frame, assume that the FP has NOT changed. */
|
||||||
|
|
||||||
|
if (old_func == find_pc_function (read_pc ()) &&
|
||||||
|
(old_frame_addr == 0 ||
|
||||||
|
FRAME_FP (get_current_frame ()) == 0 ||
|
||||||
|
old_frame_addr == FRAME_FP (get_current_frame ())))
|
||||||
source_only = -1;
|
source_only = -1;
|
||||||
else
|
else
|
||||||
source_only = 1;
|
source_only = 1;
|
||||||
|
Reference in New Issue
Block a user