Re: gdbserver with X86_64

Michael Snyder
2006-09-01T21:01:32Z

On Fri, 2006-09-01 at 14:31 +0100, Cai Qian wrote:
> Hi,
>
> On 9/1/06, Daniel Jacobowitz <drow@false.org> wrote:
> > On Fri, Sep 01, 2006 at 01:44:06PM +0100, Cai Qian wrote:
> > > 3) # Connect to gdbserver locally.
> > > gdb
> > > ...
> > > "This GDB was configured as x86_64-linux-gun"
> > > (gdb) target remote localhost:22222
> >
> > You need to give GDB a binary file before you connect. Otherwise,
> > it is defaulting to 32-bit registers.
> >
> > You should always do this, on every platform.
> >
>
> Oh, I see. Just realised
>
> set architecture i386:x86-64
>
> also work for me. However, it seems there is a problem with single step,
>
> (gdb) s
> Cannot find bounds of current function
>
> "si" do work though.

"Step" is a source-level command. It can't work without
line number symbols. Load up a symbol file before trying
to use "step".

Of course stepi (step by instruction) will most always work.