rr 4.6 imminent

Dima Kogan dima at secretsauce.net
Tue Sep 5 04:12:05 UTC 2017

Thank you very much for dealing with these. More comments...

Robert O'Callahan <robert at ocallahan.org> writes:

> On Tue, Sep 5, 2017 at 2:41 PM, Dima Kogan <dima at secretsauce.net> wrote:
>> 1. Instead of 18 unhelpful lines of text, there should be 1 line:
> This already improved on master:
> [roc at glory rr]$ rr replay abcde
> rr: Trace file `abcde/version' not found. There is no trace there.
> Is that OK?

Works for me

> 2. Something should expand ~. I think the shell is supposed to do it
>>    normally, but here emacs is doing its thing. On the other hand, using
>>    gdb under gud works just fine, even with ~. So I don't exactly know
>>    what's going on, and some quick debugging didn't make it clear (hence
>>    no patch yet). But it's probably harmless for rr to
>>    s{^~/}{$ENV{HOME}/} on the path
> In theory that could break users who want to replay a trace whose name
> starts with '~'...

Would it? The proposal was to replace leading ~/ --> $HOME/. So it would
only affect directories called "~". And if you have a directory called
"~" you should expect endless confusion with $HOME everywhere, not just
in rr.

> OK, so GUD (in gud-common-init) expands only the first command-line
> parameter. So you can fix this by creating a script 'rr-replay' that looks
> like
> #!/bin/sh
> exec rr replay "$@"
> and then run that from GUD and the parameter will expand as expected.

Ugh. That's an error-prone thing for GUD to be doing, and us talking
about it is a great example of why.

> Currently when the first non-global-option argument is not a valid
> subcommand we interpret the rest of the arguments as a command to be
> recorded. I guess if the first argument is a directory with a `version`
> file in it we could treat it as a trace to be replayed (and interpret any
> following arguments as replay arguments). That would make replay slightly
> more convenient. Worth it?

Sigh. It'd be nice from a user perspective, but that's an ugly thing to
put into your code. So it's your call if it's worth it, I think. I guess
I'll look into fixing emacs. It should perform the expansion exactly how
the shell would do it, presumably by replacing the leading ~/ in each

Thanks again.

More information about the rr-dev mailing list