From: Michael Snyder <msnyder@specifix.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] set/show enable-software-singlestep
Date: Tue, 24 Jun 2008 19:32:00 -0000 [thread overview]
Message-ID: <1214335528.3601.1216.camel@localhost.localdomain> (raw)
In-Reply-To: <20080624182933.GA12195@caradoc.them.org>
[-- Attachment #1: Type: text/plain, Size: 725 bytes --]
On Tue, 2008-06-24 at 14:29 -0400, Daniel Jacobowitz wrote:
> On Tue, Jun 24, 2008 at 11:18:54AM -0700, Michael Snyder wrote:
> > 2008-06-23 Michael Snyder <msnyder@localhost.localdomain>
> >
> > * gdbarch.c (enable_sw_ss): New mode variable.
>
> This is a generated file...
D'oh! Oh yeah...
> I recommend you leave the meaning of
> gdbarch_software_single_step_p alone, and do the adjustment at its caller.
Good suggestion. How about the attached?
On Tue, 2008-06-24 at 21:42 +0300, Eli Zaretskii wrote:
> It would be, if it were documented in the manual ;-)
I hear thee, O voice crying out in the wilderness.
I was just gonna... wait until we'd hashed out the user interface!
Yeah, that's my story... ;-)
[-- Attachment #2: canuse.txt --]
[-- Type: text/plain, Size: 2529 bytes --]
2008-06-23 Michael Snyder <msnyder@specifix.com>
* infrun.c (can_use_sw_ss): New mode variable.
(show_can_use_sw_ss): New setshow helper function.
(resume): Check for can-use-software-singlestep.
(_initialize_infrun): Add set/show command for
can-use-software-singlestep.
Index: infrun.c
===================================================================
RCS file: /cvs/src/src/gdb/infrun.c,v
retrieving revision 1.281
diff -u -p -r1.281 infrun.c
--- infrun.c 13 Jun 2008 20:19:19 -0000 1.281
+++ infrun.c 24 Jun 2008 19:22:49 -0000
@@ -583,6 +583,21 @@ static CORE_ADDR displaced_step_original
/* Saved contents of copy area. */
static gdb_byte *displaced_step_saved_copy;
+/* When this is non-zero (default), we are allowed to use software
+ singlestep, if the architecture supports it. When zero, we will
+ use the normal singlestep model even if the architecture/abi would
+ not normally permit it. */
+int can_use_sw_ss = 1;
+static void
+show_can_use_sw_ss (struct ui_file *file, int from_tty,
+ struct cmd_list_element *c,
+ const char *value)
+{
+ fprintf_filtered (file, _("\
+Debugger's willingness to use software singlestep is %s.\n"),
+ value);
+}
+
/* When this is non-zero, we are allowed to use displaced stepping, if
the architecture supports it. When this is zero, we use
traditional the hold-and-step approach. */
@@ -947,9 +962,9 @@ a command like `return' or `jump' to con
return;
}
- if (step && gdbarch_software_single_step_p (gdbarch))
+ if (step && can_use_sw_ss && gdbarch_software_single_step_p (gdbarch))
{
- /* Do it the hard way, w/temp breakpoints */
+ /* Do it the hard way, w/temp breakpoints ("software singlestep"). */
if (gdbarch_software_single_step (gdbarch, get_current_frame ()))
{
/* ...and don't ask hardware to do it. */
@@ -4634,6 +4649,16 @@ breakpoints, even if such is supported b
&maintenance_set_cmdlist,
&maintenance_show_cmdlist);
+ add_setshow_boolean_cmd ("can-use-software-singlestep", class_maintenance,
+ &can_use_sw_ss, _("\
+Set debugger's willingness to use software singlestep."), _("\
+Show debugger's willingness to use software singlestep."), _("\
+If zero, gdb will not use software singlestep, even if\n\
+the architecture API would seem to call for it."),
+ NULL,
+ show_can_use_sw_ss,
+ &maintenance_set_cmdlist,
+ &maintenance_show_cmdlist);
/* ptid initializations */
null_ptid = ptid_build (0, 0, 0);
next prev parent reply other threads:[~2008-06-24 19:25 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-24 18:43 Michael Snyder
2008-06-24 19:15 ` Daniel Jacobowitz
2008-06-24 19:32 ` Michael Snyder [this message]
2008-06-25 13:22 ` Joel Brobecker
2008-06-25 13:43 ` Daniel Jacobowitz
2008-06-25 14:15 ` Joel Brobecker
2008-06-25 14:33 ` Pedro Alves
2008-06-25 15:05 ` Daniel Jacobowitz
2008-06-25 15:38 ` Pedro Alves
[not found] ` <1214862215.3601.1525.camel@localhost.localdomain>
2008-07-10 2:46 ` Michael Snyder
2008-07-10 11:07 ` Pedro Alves
2008-07-10 22:47 ` Daniel Jacobowitz
2008-07-12 2:31 ` Michael Snyder
2008-07-12 2:28 ` Michael Snyder
2008-06-25 14:35 ` Pedro Alves
2008-06-25 14:42 ` Joel Brobecker
2008-06-24 19:25 ` Eli Zaretskii
2008-06-24 19:34 ` Luis Machado
2008-06-24 20:22 ` Michael Snyder
2008-06-25 1:40 ` Pedro Alves
2008-06-25 6:15 ` 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=1214335528.3601.1216.camel@localhost.localdomain \
--to=msnyder@specifix.com \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
/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