* inf-ttrace.c (inf_ttrace_wait): Properly report TTEVT_EXEC
events as TARGET_WAITKIND_EXECD. (inf_ttrace_detach): Reorder local variables.
This commit is contained in:
parent
a9bfff94ad
commit
5d426ff1d3
2 changed files with 15 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2005-07-21 Mark Kettenis <kettenis@gnu.org>
|
||||||
|
|
||||||
|
* inf-ttrace.c (inf_ttrace_wait): Properly report TTEVT_EXEC
|
||||||
|
events as TARGET_WAITKIND_EXECD.
|
||||||
|
(inf_ttrace_detach): Reorder local variables.
|
||||||
|
|
||||||
2005-07-20 Mark Kettenis <kettenis@gnu.org>
|
2005-07-20 Mark Kettenis <kettenis@gnu.org>
|
||||||
|
|
||||||
* inf-ttrace.c (inf_ttrace_vfork_ppid): New variable.
|
* inf-ttrace.c (inf_ttrace_vfork_ppid): New variable.
|
||||||
|
|
|
@ -758,8 +758,8 @@ inf_ttrace_attach (char *args, int from_tty)
|
||||||
static void
|
static void
|
||||||
inf_ttrace_detach (char *args, int from_tty)
|
inf_ttrace_detach (char *args, int from_tty)
|
||||||
{
|
{
|
||||||
int sig = 0;
|
|
||||||
pid_t pid = ptid_get_pid (inferior_ptid);
|
pid_t pid = ptid_get_pid (inferior_ptid);
|
||||||
|
int sig = 0;
|
||||||
|
|
||||||
if (from_tty)
|
if (from_tty)
|
||||||
{
|
{
|
||||||
|
@ -894,9 +894,14 @@ inf_ttrace_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
case TTEVT_EXEC:
|
case TTEVT_EXEC:
|
||||||
/* Make it look like a breakpoint. */
|
ourstatus->kind = TARGET_WAITKIND_EXECD;
|
||||||
ourstatus->kind = TARGET_WAITKIND_STOPPED;
|
ourstatus->value.execd_pathname =
|
||||||
ourstatus->value.sig = TARGET_SIGNAL_TRAP;
|
xmalloc (tts.tts_u.tts_exec.tts_pathlen + 1);
|
||||||
|
if (ttrace (TT_PROC_GET_PATHNAME, tts.tts_pid, 0,
|
||||||
|
(uintptr_t)ourstatus->value.execd_pathname,
|
||||||
|
tts.tts_u.tts_exec.tts_pathlen, 0) == -1)
|
||||||
|
perror_with_name (("ttrace"));
|
||||||
|
ourstatus->value.execd_pathname[tts.tts_u.tts_exec.tts_pathlen] = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TTEVT_EXIT:
|
case TTEVT_EXIT:
|
||||||
|
|
Loading…
Add table
Reference in a new issue