From: ali_anwar <ali_anwar@codesourcery.com>
To: Yao Qi <yao@codesourcery.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: Patch to propagate GDB's knowledge of the executing state to frontend
Date: Tue, 30 Oct 2012 11:53:00 -0000 [thread overview]
Message-ID: <508FBF88.2060102@codesourcery.com> (raw)
In-Reply-To: <508F719C.2080409@codesourcery.com>
On 10/30/2012 11:20 AM, Yao Qi wrote:
> On 10/25/2012 07:09 PM, ali_anwar wrote:
>> Hi,
>>
>> Attached patch is to let GDB propagate the target state under following
>> two scenarios:
>>
>> 1. Attached patch will enable GDB to inform about the state of the
>> target when it was not able to fetch the non-general registers, when
>> target is already stopped.
>>
>> The reason behind this behavior was an error message which was caused
>> when the GDB was not able to fetch the value of a certain register. The
>> GDB should have told the front end about the current state of the
>> target. The attached patch makes sure that it happens. This patch should
>> be a safety measure in case some debugging stub behaves badly.
>>
>> 2. Attached patch will enable GDB to inform about the state of the
>> target when it was not able to fetch the backtrace once the step has
>> already occurred and target is in stopped state.
>>
>
> It is better to describe what will happen or what is wrong if this patch
> is not applied.
>
Thanks Yao for the review. Let me restate the actual problem:
Under certain scenarios, GDB is unable to specify the correct target
state once the step/finish instruction is executed.
1. If you perform a step out (finish) and there is an error when GDB
tries to fetch the register values.
2. If you perform a ste and there is an error when GDB tries to fetch
the backtrace.
In both the cases the only output is an error message and nothing is
printed as far as current target state is concerned.e.g.
(gdb)
-exec-finish
^running
*running,thread-id="all"
(gdb)
^error,msg="Could not fetch register \"\"; remote failure reply 'E22'"
(gdb)
In other words from MI's perspective, the step hasn't completed yet –
the state is still "running".
The only concern is GDB not printing the state of the target. It does
not matter why the error occurred.
>> + executing state to frontend when not able to fetch registers.
>> + (wait_for_inferior): Chnage to propagate GDB's knowledge of
> ^^^^^^ typo
>
>
>> + the executing state if not able to fetch backtrace once the
>> + step has already occured.
> ^^^^^^^ typo.
>
I will fix the both typos.
> In each changelog entry, we'll put 'what do we change' instead of 'why
> do we change in this way'. So this entry can be simplified.
>
I will look into it as well.
>> + handle_inferior_event (ecs);
>> + return (0);
>
> parentheses are not needed.
>
>> +}
>> +
>> + return (0);
>
> Likewise.
>
I will remove the parentheses.
Thanks,
-Ali
next prev parent reply other threads:[~2012-10-30 11:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-25 11:10 ali_anwar
2012-10-30 6:20 ` Yao Qi
2012-10-30 11:53 ` ali_anwar [this message]
2012-11-02 10:28 ` ali_anwar
2012-11-02 11:47 ` Yao Qi
2012-11-02 12:24 ` ali_anwar
2012-11-02 16:15 ` dje
2012-11-02 18:47 ` ali_anwar
2012-11-09 19:31 ` Anwar, Ali
2012-11-09 19:42 ` Pedro Alves
2012-11-09 19:48 ` Pedro Alves
2012-11-09 23:00 ` Luis Machado
2012-11-09 23:02 ` Luis Machado
2012-11-13 21:57 ` Tom Tromey
2012-11-13 22:23 ` Luis Machado
2012-11-14 18:29 ` Pedro Alves
2012-11-15 21:23 ` Tom Tromey
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=508FBF88.2060102@codesourcery.com \
--to=ali_anwar@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=yao@codesourcery.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