[coreutils] [PATCH] Cater for extra strace output when building 32-on-64.
Dmitry V. Levin
ldv at altlinux.org
Fri Dec 3 23:58:18 UTC 2010
On Wed, Dec 01, 2010 at 09:49:14AM +0000, Pádraig Brady wrote:
> On 30/11/10 18:09, Dmitry V. Levin wrote:
> > On Mon, Nov 01, 2010 at 02:53:29PM +0000, Pádraig Brady wrote:
> > [...]
> >> --- syscall.c.orig 2010-11-01 14:46:41.292576453 +0000
> >> +++ syscall.c 2010-11-01 14:47:10.164576378 +0000
> >> @@ -953,7 +953,7 @@
> >>
> >> call = ptrace(PTRACE_PEEKTEXT, pid, (char *)rip, (char *)0);
> >> if (errno)
> >> - printf("ptrace_peektext failed: %s\n",
> >> + fprintf(stderr, "ptrace_peektext failed: %s\n",
> >> strerror(errno));
> >> switch (call & 0xffff) {
> >> /* x86-64: syscall = 0x0f 0x05 */
> >
> > Yes, this is definitely a bug, thank you.
> >
> >> @@ -972,7 +972,7 @@
> >> if (currpers != current_personality) {
> >> static const char *const names[] = {"64 bit", "32 bit"};
> >> set_personality(currpers);
> >> - printf("[ Process PID=%d runs in %s mode. ]\n",
> >> + fprintf(stderr, "[ Process PID=%d runs in %s mode. ]\n",
> >> pid, names[current_personality]);
> >> }
> >> }
> >
> > I'm not quite sure whether this message should go to stdout or stderr.
> > If it is a useful output, then it is the first case. If it is just a
> > diagnostics, then it is the second case.
>
> I got the impression that strace doesn't output anything else to stdout,
> and hence this was an oversight.
>
> > The message in its current form was introduced along with personality
> > switching support more than eight years ago.
> > I wonder is there any script that relies on the current behaviour.
>
> Hardly, and they can be easily updated if so.
OK, I've pushed the fix.
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20101204/39056924/attachment.bin>
More information about the Strace-devel
mailing list