RFA: fix PR mi/8138

Pedro Alves pedro@codesourcery.com
Tue Jan 11 00:07:00 GMT 2011


On Monday 10 January 2011 20:15:56, Tom Tromey wrote:
> +@table @samp
> +@item from
> +@itemx to
> +These items, if provided, are a range of addresses belonging to this
> +shared library.

> +^done,sharedlibs=[lib=[from="0x00111360",to="0x00111498",syms-read="2",name="/lib/libexample.so"]]

The =library-loaded event was added with the "from" and "to"
fields left out on purpose.  I think that this command should
be consistent with the event.  The event outputs both target and
host paths to the shared library, this prints only a single "name".

I'm not objecting, but I'm almost certain that I remember
someone bringing up that this MI command was missing, but
it was then mentioned that there's no real need for it
since the frontend should be getting everything it needs
from the =library-loaded / =library-unloaded events.
(This PR predates these events by a few years).

> +void
> +mi_cmd_file_list_shared_libraries (char *command, char **argv, int argc)
> +{
> +  if (!mi_valid_noargs ("mi_cmd_file_list_shared_libraries", argc, argv))
> +    error (_("mi_cmd_file_list_shared_libraries: Usage: No args"));

These errors should not show GDB's function name, but instead the MI command
name.  We have many instances of this issue, but we have been fasing them
out, and avoiding introducing new ones.

-- 
Pedro Alves



More information about the Gdb-patches mailing list