This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] let record_resume fail immediately on error


On Tue, Sep 8, 2009 at 15:25, Hui Zhu<teawater@gmail.com> wrote:
> If GDB call error in record_resume, user cannot keep debug the inferior.
>
> Hui
>
> On Tue, Sep 8, 2009 at 15:23, Hui Zhu<teawater@gmail.com> wrote:
>> The "record_resume_error" in gdb-cvs is to make user after get a error
>> of record_message, they can "record stop" close the record and keep
>> debug the inferior.
>>
>> Thanks,
>> Hui
>>
>> On Tue, Sep 8, 2009 at 14:58, Joel Brobecker<brobecker@adacore.com> wrote:
>>>> ? ?if (!RECORD_IS_REPLAY)
>>>> ? ? ?{
>>>> ? ? ? ?if (do_record_message (get_current_regcache ()))
>>>> - ? ? ? ?{
>>>> - ? ? ? ? ?record_resume_error = 0;
>>>> - ? ? ? ?}
>>>> - ? ? ?else
>>>> - ? ? ? ?{
>>>> - ? ? ? ? ?record_resume_error = 1;
>>>> - ? ? ? ? ?return;
>>>> - ? ? ? ?}
>>>> + ? ? internal_error (__FILE__, __LINE__,
>>>> + ? ? ? ? ? ? ? ? ? ? _("record_resume: do_record_message failed."));
>>>> +
>>>
>>> Forgive me if I'm wrong, as I don't know the record.c code at all, but
>>> I cannot help but think that the internal_error is suspicious here.
>>> Why is this an internal_error?
>>>
>>> --
>>> Joel
>>>
>>
>

Hi guys,

I make a patch that make "record_resume_error" work better.  I did
some test.  It seems better than before.

Please help me with it.

Thanks,
Hui

2009-09-08  Hui Zhu  <teawater@gmail.com>

	* record.c (record_wait): Change TARGET_SIGNAL_ABRT to
	TARGET_SIGNAL_0.
---
 record.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/record.c
+++ b/record.c
@@ -590,7 +590,7 @@ record_wait (struct target_ops *ops,
 	{
 	  /* If record_resume get error, return directly.  */
 	  status->kind = TARGET_WAITKIND_STOPPED;
-	  status->value.sig = TARGET_SIGNAL_ABRT;
+	  status->value.sig = TARGET_SIGNAL_0;
 	  return inferior_ptid;
 	}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]