Re: gdbserver relocation?

Daniel Jacobowitz
2003-02-24T14:28:43Z

On Mon, Feb 24, 2003 at 05:28:33PM +0900, Miles Bader wrote:
> Hi,
>
> I've been trying to get gdbserver working on the v850, and I'm wondering
> the m68k port deals with the address offset between the symbol file and
> the actual executable, since unlike in normal linux, the executable gets
> relocated at runtime in uClinux in a user visible way.
>
> Does gdb itself have a `set base address' command? I saw the `section'
> command, but it didn't seem to have any useful effect.
>
> It seems to me that it has to be gdb that does the offseting, since
> gdbserver doesn't know which values would need adjustment (e.g.,
> returned register values).

You're right. Gdbserver doesn't do anything with symbol lookup at
all; so this has to happen in the client.

You're wrong about referencing the m68k port though. GDB's m68k/linux
port (I assume that's what you meant) is for Linux, not uClinux.

--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer