Re: [PATCH 06/18] New module remote-wtx-utils

Tom Tromey
2011-02-24T19:22:48Z

>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:

Joel> I rewrote a bit the routines to depend on two functions gdb_dlopen and
Joel> gdb_dlsym which we could isolate in its own gdb_dlfcn.h/c if we wanted to.

The problem with putting stuff like this into a place like
remote-wtx-utils.c is that if somebody does need it later, they probably
will not know it exists, and will reimplement. This happens with some
of the CLI utility functions.

I think it is somewhat better to pick a generic spot to put the new
functions, and just make the most convenient failure choice -- like, if
they aren't available, have them internal_error or whatever else is
convenient and unambiguous.

That said, it doesn't matter hugely to me.

Joel> +void *
Joel> +load_shared_lib (char *lib_name)

I think the argument could be const.

Joel> +void *
Joel> +get_symbol_from_shared_lib (void *handle, char *symbol)

Likewise.

Tom