From: teawater <teawater@gmail.com>
To: Pedro Alves <pedro@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] Submit process record and replay third time, 3/9
Date: Fri, 23 Jan 2009 06:58:00 -0000 [thread overview]
Message-ID: <daef60380901222257q6617c076pe943d38ea48e8547@mail.gmail.com> (raw)
In-Reply-To: <daef60380901221600l5401dbafi3ef9074816d86c23@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1711 bytes --]
Hi Pedro,
I found that remote.c use signal so I make a patch change sigaction to signal.
Do you think I can keep record.c in all place with this patch?
Thanks,
Hui
On Fri, Jan 23, 2009 at 08:00, teawater <teawater@gmail.com> wrote:
> I think my prev mail is not right.
>
> linux-record.c is not like record.c. It's for the tgt part and it
> doesn't have some os-special code.
>
> I think I will try to put it close to linux-nat.c.
>
> BTW I really want record.c to be a os-nospecial code. Do you have some
> idea with it. I think there just 2 sigaction in there, maybe I can
> make it not os-special.
>
>
> And for this record_beneath_to_xxx function pointer, do you agree with I said?
>
>
> Thanks,
> Hui
>
> On Fri, Jan 23, 2009 at 06:36, Pedro Alves <pedro@codesourcery.com> wrote:
>> On Thursday 22 January 2009 22:34:25, Pedro Alves write:
>>> Here's what I propose you try as first step: remove all references to record.o
>>> from Makefile.in and configure.tgt. Try building. You'll get link errors. Now,
>>> come up with interfaces between the core and record.c that would preserve all
>>> functionality if record.o isn't included in the link; but that will still link
>>> a gdb executable, if record.o isn't linked in.
>>
>> Sigh, I said "isn't" when I mean "is". Let me try again,
>>
>> Here's what I propose you try as first step: remove all references to record.o
>> from Makefile.in and configure.tgt. Try building. You'll get link errors. Now,
>> come up with interfaces between the core and record.c that would preserve all
>> functionality if record.o *is* included in the link; but that will still link
>> a gdb executable, if record.o *isn't* linked in.
>>
>> --
>> Pedro Alves
>>
>
[-- Attachment #2: record-target-remove-sigaction.txt --]
[-- Type: text/plain, Size: 1342 bytes --]
Index: gdb/record.c
===================================================================
--- gdb.orig/record.c 2009-01-23 10:48:23.000000000 +0800
+++ gdb/record.c 2009-01-23 15:04:11.000000000 +0800
@@ -23,6 +23,7 @@
#include "regcache.h"
#include "inferior.h"
#include "gdbthread.h"
+#include "event-top.h"
#include "record.h"
#include <signal.h>
@@ -621,7 +622,6 @@
}
else
{
- struct sigaction act, old_act;
int need_dasm = 0;
struct regcache *regcache = get_current_regcache ();
int continue_flag = 1;
@@ -656,13 +656,7 @@
}
record_get_sig = 0;
- act.sa_handler = record_sig_handler;
- act.sa_mask = record_maskall;
- act.sa_flags = SA_RESTART;
- if (sigaction (SIGINT, &act, &old_act))
- {
- perror_with_name (_("Process record: sigaction failed"));
- }
+ signal (SIGINT, record_sig_handler);
/* If GDB is in terminal_inferior mode, it will not get the signal.
And in GDB replay mode, GDB doesn't need to be in terminal_inferior
mode, because inferior will not executed.
@@ -831,10 +825,7 @@
}
while (continue_flag);
- if (sigaction (SIGALRM, &old_act, NULL))
- {
- perror_with_name (_("Process record: sigaction failed"));
- }
+ signal (SIGINT, handle_sigint);
replay_out:
if (record_get_sig)
next prev parent reply other threads:[~2009-01-23 6:58 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-08 5:46 teawater
2009-01-13 3:06 ` teawater
2009-01-20 18:32 ` Marc Khouzam
2009-01-20 19:47 ` Marc Khouzam
2009-01-21 0:20 ` teawater
2009-01-21 2:53 ` teawater
2009-01-22 13:23 ` Pedro Alves
2009-01-22 15:23 ` teawater
2009-01-22 22:33 ` Pedro Alves
2009-01-22 22:36 ` Pedro Alves
2009-01-23 0:00 ` teawater
2009-01-23 6:58 ` teawater [this message]
2009-01-23 14:56 ` teawater
2009-01-23 15:34 ` Pedro Alves
2009-01-23 15:55 ` teawater
2009-02-02 9:05 ` teawater
2009-02-08 13:03 ` teawater
2009-02-17 7:12 ` teawater
2009-02-17 7:21 ` teawater
2009-02-23 16:05 ` teawater
2009-03-03 20:40 ` Pedro Alves
2009-03-04 3:42 ` teawater
2009-03-09 6:01 ` teawater
2009-03-09 19:31 ` Pedro Alves
2009-03-10 17:03 ` teawater
2009-03-09 20:35 ` Pedro Alves
2009-03-10 17:32 ` teawater
2009-03-10 19:35 ` Pedro Alves
2009-03-11 1:15 ` teawater
2009-03-13 0:27 ` teawater
2009-03-16 11:21 ` teawater
2009-03-18 8:50 ` teawater
2009-03-18 13:12 ` teawater
2009-03-18 13:05 ` teawater
2009-03-18 13:14 ` teawater
2009-03-18 13:54 ` teawater
2009-02-23 14:08 ` teawater
2009-02-28 10:02 ` teawater
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=daef60380901222257q6617c076pe943d38ea48e8547@mail.gmail.com \
--to=teawater@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=pedro@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