Re: Adding Python files to be autoloaded for a particular architecture

Christian Biesinger
2020-07-20T20:27:32Z

On Fri, Jul 17, 2020 at 5:38 PM Reuben Thomas <rrt@sc3d.org> wrote:
>
> [Apologies to Christian, I sent a reply off-list. Replying again to all.]
>
> On Fri, 17 Jul 2020 at 23:32, Christian Biesinger <cbiesinger@google.com> wrote:
>
>>
>> Sorry, to clarify, my suggestion is:
>> - Configure your gdb with --with-system-gdbinit-dir=/etc/gdbinit.d or
>> something, and
>> - Add rules to install your new file in that dir, if your platform is
>> enabled & the system init dir was provided
>
>
> Thanks very much for the clarification. However, it's unfortunate that a user of my architecture would have to configure --with-system-gdbinit-dir, or not get the Python files?

I see. In that case, I see two options:
- Put it in gdb/python/lib/gdb. That directory has so far only been
used as an implementation detail for gdb's python API, but maybe
maintainers will be OK with extending it in that way. That dir does
get installed whenever python is enabled.
- Or implement it in C++

How does that sound?

Christian