public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Luis Machado <luis_gustavo@mentor.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org, brobecker@adacore.com
Subject: Re: [RFC stub-side break conditions 0/5]  General info
Date: Fri, 06 Jan 2012 10:49:00 -0000	[thread overview]
Message-ID: <4F06D199.9040301@mentor.com> (raw)
In-Reply-To: <831urdp8vb.fsf@gnu.org>

On 01/06/2012 05:50 AM, Eli Zaretskii wrote:
>> Date: Thu, 05 Jan 2012 12:55:58 -0200
>> From: Luis Machado<luis_gustavo@mentor.com>
>>
>> This patch series adds support and required machinery to enable
>> breakpoint condition evaluation on the stub's side instead of solely in
>> the host's side.
>>
>> When the evaluation is done on the stub's side, we eliminate all the
>> useless stub ->  GDB trap notifications that happen when the condition is
>> false, potentially improving the speed of debugging on slower connections.
> But the downside is that the stub has more work to do, and therefore
> can potentially disrupt the timeline of the program being debugged.
> Is this feature really worth it?  How "slow" should a slow connection
> be before this becomes a win? are there types of programs where this
> mode should never be used for fear of interfering with the program's
> timings?

Thanks for the feedback (cc-ing Joel as well).

I apologize for not being perfectly clear about the motivation for this 
patch.

While this may not represent a huge boost in performance over the 
previous breakpoint condition evaluation method, it a step towards 
agent-based evaluations, see 
http://sourceware.org/ml/gdb/2011-11/msg00014.html.

Consider this a preparation patch to enable breakpoint condition 
evaluation by the target agent. That mode of evaluation will have much 
more noticeable effects due to the fact that GDB/GDBServer are not 
involved in the evaluation process itself, but we need some 
infrastructure before moving to that kind of operation.

For example, GDBServer needs to receive the conditional expressions and 
needs to understand how to handle them.

This feature also means GDB won't have to be notified everytime a 
conditional breakpoint triggers. It will just be notified when the 
condition is true, avoiding a number of round trips if the condition is 
very specific. In the future, with the aid of the agent, this will 
represent a good improvement.

>> A new switch was added to make it possible to choose between gdb/stub
>> evaluation modes: set/show breakpoint condition-evaluation.  It defaults
>> to "auto". "auto" means "gdb" whenever the stub can't handle breakpoint
>> condition evaluation or when the expression can't be evaluated by the
>> agent expression machinery. "auto" means "stub" when the remote stub
>> supports evaluating conditions and if the expressions generate valid
>> agent expression bytecodes.
> Isn't it better to make the default be "off", i.e. keep the previous
> modus operandi?
In this case, the old behavior is kept intact with mode "gdb". I'm ok 
with keeping it that way, for the sake of potentially slow targets. We 
can always reconsider this at a later stage.

Luis
lgustavo@codesourcery.com

  parent reply	other threads:[~2012-01-06 10:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-05 14:56 Luis Machado
2012-01-06  7:53 ` Eli Zaretskii
2012-01-06  9:10   ` Joel Brobecker
2012-01-06 10:49   ` Luis Machado [this message]
2012-01-06 20:12   ` Stan Shebs
2012-01-06 20:48     ` Eli Zaretskii

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=4F06D199.9040301@mentor.com \
    --to=luis_gustavo@mentor.com \
    --cc=brobecker@adacore.com \
    --cc=eliz@gnu.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).