This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, v2] Improve load command's help text


I suspect that the reason these weren't originally mentioned
in the help was/is that the accepted arguments depend on target.

Back when we had support for a bunch of different remote
targets, we had more target_load implementations.
Nowadays, there's much fewer targets, though still a couple
load implemenations:

 $ grep "[.\->]to_load = " *
 remote.c:  remote_ops.to_load = remote_load;
 remote-sim.c:  gdbsim_ops.to_load = gdbsim_load;

remote_load calls generic_load, which accepts the offset.
gdbsim_load doesn't support an offset, but understands that
what comes after the filename is an offset.

(we could probably factor out more bits from those
two implementations to load_command.)

> -@kindex load @var{filename}
> -@item load @var{filename}
> +@kindex load @var{filename} @var{offset}
> +@item load @var{filename} @var{offset}
>  @anchor{load}
>  Depending on what remote debugging facilities are configured into
>  @value{GDBN}, the @code{load} command may be available.  Where it exists, it
> @@ -19611,6 +19611,10 @@ link the program; for other formats, like a.out, the object file format
>  specifies a fixed address.
>  @c FIXME! This would be a good place for an xref to the GNU linker doc.
>  
> +It is also possible to tell @value{GDBN} to load the symbol file at a specific

executable file, not symbol file.

> +offset described by the optional argument @var{offset}.  When @var{offset} is
> +provided, @var{filename} must also be provided.

LGTM with that, but Eli should review this.

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]