diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2023-03-02 15:32:23 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2023-03-07 16:30:14 -0500 |
commit | 5a8ac2cb96cdb6c470a2ad4dec6442a21aa7dae9 (patch) | |
tree | 9d94cf11a0307aacba3876c1ec687a95bf5f0b3e /binutils/strings.c | |
parent | f4db482bac97b12de5b25c203e3d24116e2a46bb (diff) | |
download | binutils-5a8ac2cb96cdb6c470a2ad4dec6442a21aa7dae9.zip binutils-5a8ac2cb96cdb6c470a2ad4dec6442a21aa7dae9.tar.gz binutils-5a8ac2cb96cdb6c470a2ad4dec6442a21aa7dae9.tar.bz2 |
gdb: make interp::m_name an `const char *`
I realized that the memory for interp names does not need to be
allocated. The name used to register interp factory functions is always
a literal string, so has static storage duration. If we change
interp_lookup to pass that name instead of the string that it receives
as a parameter (which does not always have static storage duration),
then interps can simply store pointers to the name.
So, change interp_lookup to pass `factory.name` rather than `name`.
Change interp::m_name to be a `const char *` rather than an std::string.
Change-Id: I0474d1f7b3512e7d172ccd73018aea927def3188
Reviewed-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'binutils/strings.c')
0 files changed, 0 insertions, 0 deletions