Invoking 'rr replay' from emacs

Dima Kogan rr at dima.secretsauce.net
Sat Feb 11 23:09:51 UTC 2017


Hi. Replies inline


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

> On Thu, Feb 9, 2017 at 11:43 AM, Dima Kogan <dima at secretsauce.net> wrote:
>> - gud:          requires gdb to be invoked with --fullname
>> - many-windows: requires gdb to be invoked with -i=mi
>>
>> When starting an gdb-inside-emacs session, these options are presented
>> to the user by default, so the user doesn't need to remember them or
>> think about them. It would be nice if 'rr replay' took these options as
>> well. So
>>
>>   1. The user would hit 'M-x gdb' as usual
>>
>>   2. The user would be presented with the default 'gdb -i=mi' invocation
>>
>>   3. The user would change this to 'rr replay -i=mi ...'
>>
>>   4. Their gdb session would work as before
>>
>> This is a trivial patch, and I can contribute it, if it would be
>> accepted. I know that 'rr replay' does more than just invoke gdb, and
>> passing through every single gdb option probably is too much, but
>> passing --fullname and -i would be nice. --annotate would also be a nice
>> thing: --fullname is a special case of --annotate.
>>
>> If you would rather not do this, would you be opposed to an option in
>> 'rr replay' that explicitly passes through to gdb? Something like -x,
>> but that takes in strings and not files? So instead of 'rr replay
>> --fullname' you'd invoke 'rr replay -g "--fullname"'? In this case an
>> emacs-specific note in 'rr help replay' would be good.
>
> This already exists: --debugger-option. Obviously it needs to be
> better documented somehow...

It's documented just fine. I was just using the latest rr in Debian,
which is one release too old, and doesn't have --debugger-option yet.



> However, I think it would be fine to pass through more gdb options
> automatically as well. The two you mentioned sound fine.

OK. I'm attaching two patches. The first allows the '-i=mi' form.
Previously short options could only take arguments delimited with ' '
and not '='.

The second actually adds support for the options in question.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-cmdline-arg-parser-supports-short-option-arguments.patch
Type: text/x-diff
Size: 978 bytes
Desc: not available
URL: <http://mail.mozilla.org/pipermail/rr-dev/attachments/20170211/be48ced8/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-rr-replay-now-supports-gdb-interface-options.patch
Type: text/x-diff
Size: 2464 bytes
Desc: not available
URL: <http://mail.mozilla.org/pipermail/rr-dev/attachments/20170211/be48ced8/attachment-0001.bin>


More information about the rr-dev mailing list