This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 4/7] New commands for loading and unloading a reader.
>>>>> "Sanjoy" == Sanjoy Das <sanjoy@playingwithpointers.com> writes:
This patch looks pretty good.
Sanjoy> +static struct jit_reader
Sanjoy> +{
Sanjoy> + struct gdb_reader_funcs *functions;
Sanjoy> +} *loaded_jit_reader = NULL;
I think this should also have the gdb_dlopen result in it.
In the current patch, jit-reader-unload never calls dlclose, but it
seems to me that it should.
Sanjoy> + char so_name[PATH_MAX];
Don't use PATH_MAX.
Sanjoy> + snprintf (so_name, PATH_MAX, "%s/%s", jit_reader_dir, args);
You can use xstrprintf here instead; then make a cleanup to xfree it.
Sanjoy> + add_com ("jit-reader-load", no_class, jit_reader_load_command, _("\
I think class_obscure is maybe a better fit than no_class. Though
truthfully I can't claim to understand the class_* breakdown very well.
Tom