mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2025-01-05 19:29:35 +00:00
gdb/
* corelow.c (core_open): Use target_signal_from_host if CORE_GDBARCH is NULL. * fork-child.c (startup_inferior) <resume_signal>: Use enum target_signal type. * linux-nat.c (linux_nat_resume): Use target_signal_to_host before calling strsignal. Use enum target_signal type for saved_signo. (linux_handle_extended_wait) <signo>: Use enum target_signal type. (linux_nat_wait_1): Use enum target_signal type for signo. Use target_signal_to_host before calling strsignal. * remote-m32r-sdi.c (m32r_wait, m32r_detach): Replace 0 by TARGET_SIGNAL_0. gdb/gdbserver/ * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
This commit is contained in:
parent
a6eb9bc860
commit
423ec54cd3
@ -1,3 +1,18 @@
|
|||||||
|
2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
Pedro Alves <pedro@codesourcery.com>
|
||||||
|
|
||||||
|
* corelow.c (core_open): Use target_signal_from_host if CORE_GDBARCH
|
||||||
|
is NULL.
|
||||||
|
* fork-child.c (startup_inferior) <resume_signal>: Use enum
|
||||||
|
target_signal type.
|
||||||
|
* linux-nat.c (linux_nat_resume): Use target_signal_to_host before
|
||||||
|
calling strsignal. Use enum target_signal type for saved_signo.
|
||||||
|
(linux_handle_extended_wait) <signo>: Use enum target_signal type.
|
||||||
|
(linux_nat_wait_1): Use enum target_signal type for signo. Use
|
||||||
|
target_signal_to_host before calling strsignal.
|
||||||
|
* remote-m32r-sdi.c (m32r_wait, m32r_detach): Replace 0 by
|
||||||
|
TARGET_SIGNAL_0.
|
||||||
|
|
||||||
2010-09-06 Pedro Alves <pedro@codesourcery.com>
|
2010-09-06 Pedro Alves <pedro@codesourcery.com>
|
||||||
Jan Kratochvil <jan.kratochvil@redhat.com>
|
Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
@ -429,15 +429,18 @@ core_open (char *filename, int from_tty)
|
|||||||
|
|
||||||
siggy = bfd_core_file_failing_signal (core_bfd);
|
siggy = bfd_core_file_failing_signal (core_bfd);
|
||||||
if (siggy > 0)
|
if (siggy > 0)
|
||||||
/* NOTE: target_signal_from_host() converts a target signal value
|
{
|
||||||
into gdb's internal signal value. Unfortunately gdb's internal
|
/* NOTE: target_signal_from_host() converts a target signal value
|
||||||
value is called ``target_signal'' and this function got the
|
into gdb's internal signal value. Unfortunately gdb's internal
|
||||||
name ..._from_host(). */
|
value is called ``target_signal'' and this function got the
|
||||||
printf_filtered (_("Program terminated with signal %d, %s.\n"), siggy,
|
name ..._from_host(). */
|
||||||
target_signal_to_string (
|
enum target_signal sig = (core_gdbarch != NULL
|
||||||
(core_gdbarch != NULL) ?
|
? gdbarch_target_signal_from_host (core_gdbarch, siggy)
|
||||||
gdbarch_target_signal_from_host (core_gdbarch, siggy)
|
: target_signal_from_host (siggy));
|
||||||
: siggy));
|
|
||||||
|
printf_filtered (_("Program terminated with signal %d, %s.\n"), siggy,
|
||||||
|
target_signal_to_string (sig));
|
||||||
|
}
|
||||||
|
|
||||||
/* Fetch all registers from core file. */
|
/* Fetch all registers from core file. */
|
||||||
target_fetch_registers (get_current_regcache (), -1);
|
target_fetch_registers (get_current_regcache (), -1);
|
||||||
|
@ -448,7 +448,7 @@ startup_inferior (int ntraps)
|
|||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
int resume_signal = TARGET_SIGNAL_0;
|
enum target_signal resume_signal = TARGET_SIGNAL_0;
|
||||||
ptid_t event_ptid;
|
ptid_t event_ptid;
|
||||||
|
|
||||||
struct target_waitstatus ws;
|
struct target_waitstatus ws;
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
* target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
|
||||||
|
|
||||||
2010-09-06 Pedro Alves <pedro@codesourcery.com>
|
2010-09-06 Pedro Alves <pedro@codesourcery.com>
|
||||||
|
|
||||||
* Makefile.in (install-only): Replace $IPA_DEPFILES with
|
* Makefile.in (install-only): Replace $IPA_DEPFILES with
|
||||||
|
@ -98,7 +98,7 @@ mywait (ptid_t ptid, struct target_waitstatus *ourstatus, int options,
|
|||||||
|
|
||||||
if (ourstatus->kind == TARGET_WAITKIND_EXITED)
|
if (ourstatus->kind == TARGET_WAITKIND_EXITED)
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
"\nChild exited with status %d\n", ourstatus->value.sig);
|
"\nChild exited with status %d\n", ourstatus->value.integer);
|
||||||
else if (ourstatus->kind == TARGET_WAITKIND_SIGNALLED)
|
else if (ourstatus->kind == TARGET_WAITKIND_SIGNALLED)
|
||||||
fprintf (stderr, "\nChild terminated with signal = 0x%x (%s)\n",
|
fprintf (stderr, "\nChild terminated with signal = 0x%x (%s)\n",
|
||||||
target_signal_to_host (ourstatus->value.sig),
|
target_signal_to_host (ourstatus->value.sig),
|
||||||
|
@ -1874,7 +1874,8 @@ linux_nat_resume (struct target_ops *ops,
|
|||||||
"LLR: Preparing to %s %s, %s, inferior_ptid %s\n",
|
"LLR: Preparing to %s %s, %s, inferior_ptid %s\n",
|
||||||
step ? "step" : "resume",
|
step ? "step" : "resume",
|
||||||
target_pid_to_str (ptid),
|
target_pid_to_str (ptid),
|
||||||
signo ? strsignal (signo) : "0",
|
(signo != TARGET_SIGNAL_0
|
||||||
|
? strsignal (target_signal_to_host (signo)) : "0"),
|
||||||
target_pid_to_str (inferior_ptid));
|
target_pid_to_str (inferior_ptid));
|
||||||
|
|
||||||
block_child_signals (&prev_mask);
|
block_child_signals (&prev_mask);
|
||||||
@ -1907,7 +1908,7 @@ linux_nat_resume (struct target_ops *ops,
|
|||||||
|
|
||||||
if (lp->status && WIFSTOPPED (lp->status))
|
if (lp->status && WIFSTOPPED (lp->status))
|
||||||
{
|
{
|
||||||
int saved_signo;
|
enum target_signal saved_signo;
|
||||||
struct inferior *inf;
|
struct inferior *inf;
|
||||||
|
|
||||||
inf = find_inferior_pid (ptid_get_pid (lp->ptid));
|
inf = find_inferior_pid (ptid_get_pid (lp->ptid));
|
||||||
@ -1974,7 +1975,8 @@ linux_nat_resume (struct target_ops *ops,
|
|||||||
"LLR: %s %s, %s (resume event thread)\n",
|
"LLR: %s %s, %s (resume event thread)\n",
|
||||||
step ? "PTRACE_SINGLESTEP" : "PTRACE_CONT",
|
step ? "PTRACE_SINGLESTEP" : "PTRACE_CONT",
|
||||||
target_pid_to_str (ptid),
|
target_pid_to_str (ptid),
|
||||||
signo ? strsignal (signo) : "0");
|
(signo != TARGET_SIGNAL_0
|
||||||
|
? strsignal (target_signal_to_host (signo)) : "0"));
|
||||||
|
|
||||||
restore_child_signals_mask (&prev_mask);
|
restore_child_signals_mask (&prev_mask);
|
||||||
if (target_can_async_p ())
|
if (target_can_async_p ())
|
||||||
@ -2266,7 +2268,7 @@ linux_handle_extended_wait (struct lwp_info *lp, int status,
|
|||||||
catchpoints. */
|
catchpoints. */
|
||||||
if (!stopping)
|
if (!stopping)
|
||||||
{
|
{
|
||||||
int signo;
|
enum target_signal signo;
|
||||||
|
|
||||||
new_lp->stopped = 0;
|
new_lp->stopped = 0;
|
||||||
new_lp->resumed = 1;
|
new_lp->resumed = 1;
|
||||||
@ -3567,7 +3569,7 @@ retry:
|
|||||||
|
|
||||||
if (WIFSTOPPED (status))
|
if (WIFSTOPPED (status))
|
||||||
{
|
{
|
||||||
int signo = target_signal_from_host (WSTOPSIG (status));
|
enum target_signal signo = target_signal_from_host (WSTOPSIG (status));
|
||||||
struct inferior *inf;
|
struct inferior *inf;
|
||||||
|
|
||||||
inf = find_inferior_pid (ptid_get_pid (lp->ptid));
|
inf = find_inferior_pid (ptid_get_pid (lp->ptid));
|
||||||
@ -3597,7 +3599,9 @@ retry:
|
|||||||
lp->step ?
|
lp->step ?
|
||||||
"PTRACE_SINGLESTEP" : "PTRACE_CONT",
|
"PTRACE_SINGLESTEP" : "PTRACE_CONT",
|
||||||
target_pid_to_str (lp->ptid),
|
target_pid_to_str (lp->ptid),
|
||||||
signo ? strsignal (signo) : "0");
|
(signo != TARGET_SIGNAL_0
|
||||||
|
? strsignal (target_signal_to_host (signo))
|
||||||
|
: "0"));
|
||||||
lp->stopped = 0;
|
lp->stopped = 0;
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
|
@ -715,7 +715,7 @@ m32r_wait (struct target_ops *ops,
|
|||||||
fprintf_unfiltered (gdb_stdlog, "m32r_wait()\n");
|
fprintf_unfiltered (gdb_stdlog, "m32r_wait()\n");
|
||||||
|
|
||||||
status->kind = TARGET_WAITKIND_EXITED;
|
status->kind = TARGET_WAITKIND_EXITED;
|
||||||
status->value.sig = 0;
|
status->value.sig = TARGET_SIGNAL_0;
|
||||||
|
|
||||||
interrupted = 0;
|
interrupted = 0;
|
||||||
prev_sigint = signal (SIGINT, gdb_cntrl_c);
|
prev_sigint = signal (SIGINT, gdb_cntrl_c);
|
||||||
@ -886,7 +886,7 @@ m32r_detach (struct target_ops *ops, char *args, int from_tty)
|
|||||||
if (remote_debug)
|
if (remote_debug)
|
||||||
fprintf_unfiltered (gdb_stdlog, "m32r_detach(%d)\n", from_tty);
|
fprintf_unfiltered (gdb_stdlog, "m32r_detach(%d)\n", from_tty);
|
||||||
|
|
||||||
m32r_resume (ops, inferior_ptid, 0, 0);
|
m32r_resume (ops, inferior_ptid, 0, TARGET_SIGNAL_0);
|
||||||
|
|
||||||
/* calls m32r_close to do the real work */
|
/* calls m32r_close to do the real work */
|
||||||
pop_target ();
|
pop_target ();
|
||||||
|
Loading…
Reference in New Issue
Block a user