From: Thiago Jung Bauermann <bauerman@br.ibm.com>
To: Michael Snyder <msnyder@vmware.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [RFA] Resubmit reverse debugging [5/5]
Date: Wed, 08 Oct 2008 18:15:00 -0000 [thread overview]
Message-ID: <1223489663.19088.43.camel@localhost.localdomain> (raw)
In-Reply-To: <48EC18F9.8040105@vmware.com>
El mar, 07-10-2008 a las 19:20 -0700, Michael Snyder escribió:
> +static void
> +exec_reverse_once (char *cmd, char *args, int from_tty)
> +{
> + /* String buffer for command consing. */
> + char reverse_command[512];
<snip>
> + sprintf (reverse_command, "%s %s", cmd, args ? args : "");
> +
> + execution_direction = EXEC_REVERSE;
> + execute_command (reverse_command, from_tty);
> + do_cleanups (old_chain);
That fixed-length buffer being written with sprintf doesn't look good...
What do you think about using xstrprintf instead? That will remove the
possibility of buffer overflow, and also remove an arbitrary limit.
> + add_com ("reverse-next", class_run, reverse_next, _("\
> +Step program backward, proceeding through subroutine calls.\n\
> +Like the \"reverse-step\" command as long as subroutine calls do not happen;\n\
> +when they do, the call is treated as one instruction.\n\
> +Argument N means do this N times (or till program stops for another reason).")
> + );
> + add_com_alias ("rn", "reverse-next", class_alias, 1);
What about adding "previous" and either "pr" or "pre" as alias to
reverse-next? Sounds more natural to me than "reverse-next". Similarly,
"previousi" and "pri" or "prei".
I'd also half-seriously suggest adding a "step-back" alias on the same
grounds. :-)
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
next prev parent reply other threads:[~2008-10-08 18:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-08 2:23 Michael Snyder
2008-10-08 18:15 ` Thiago Jung Bauermann [this message]
2008-10-08 19:16 ` Eli Zaretskii
2008-10-09 4:23 ` Pedro Alves
2008-10-09 8:41 ` Eli Zaretskii
2008-10-08 20:14 ` Thiago Jung Bauermann
2008-10-08 20:55 ` Michael Snyder
2008-10-08 20:27 ` Michael Snyder
2008-10-08 20:43 ` Thiago Jung Bauermann
2008-12-15 12:29 ` Tomas Holmberg
2008-10-08 21:06 ` Michael Snyder
2008-10-08 21:14 ` Thiago Jung Bauermann
2008-10-17 19:48 ` Michael Snyder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1223489663.19088.43.camel@localhost.localdomain \
--to=bauerman@br.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=msnyder@vmware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox