Jan Kratochvil | 27 Apr 15:00 2011
Picon

Re: Code cleanup - split print_stop_reason / question

On Wed, 27 Apr 2011 13:27:38 +0200, Kevin Pouget wrote:
> I had a little question regarding Jan's patch below,
> do you remember why you print the `exitstatus' in octal?

This is not from me.  When you check the history (I use git annotate file,
git annotate file REVISION^, git annotate file PREVREVISION^ and so on) you
will find that line of code comes from:

commit 14558c99c9b3adcfd7ab7934392a7b958337a015
Author: Jason Molenda <jsm <at> bugshack.cygnus.com>
Date:   Thu Feb 3 04:14:45 2000 +0000

    import gdb-2000-02-02 snapshot

So there is no further history and the line's original author is unknown.

AFAIK there was a tradition in UNIX to deal with program exit codes in octal.
I do not know why.

Thanks,
Jan

Kevin Pouget | 27 Apr 15:16 2011
Picon

Re: Code cleanup - split print_stop_reason / question

> This is not from me.

oh, sorry
at least, you're the last one who touched this line, right?

git blame gdb/infrun.c
...
8fc36186 (Jan Kratochvil     2010-09-04 14:27:43 +0000 5504)
ui_out_field_fmt (uiout, "exit-code", "0%o", (unsigned int)
exitstatus);
...

> When you check the history (I use git annotate file,
> git annotate file REVISION^, git annotate file PREVREVISION^ and so on) you
> will find that line of code comes from:

ok, thanks

> AFAIK there was a tradition in UNIX to deal with program exit codes in octal.
> I do not know why.

ok, so if it's a tradition, let's perpetuate the tradition :)

--
Kevin


Gmane