0

I have installed GDB using apt-get. The host and targets are the same. I want to use it for cross debugging. Could anyone help out how to achieve this ?

Thanks in advance,

2
  • this might help: stlinux.com/devel/debug/user/cross Commented Oct 12, 2015 at 8:49
  • Thanks, but I have come across this article before and it assumes that the GDB is already configured with --target=arm-none-linux-gnu, Commented Oct 12, 2015 at 11:06

2 Answers 2

1

The host and targets are the same. I want to use it for cross debugging.

You can't.

You need to build (or install a prebuilt one -- it's often included with your cross-compiler) a cross-gdb, and use that to perform cross-debugging.

Sign up to request clarification or add additional context in comments.

Comments

1

You should install gdb multiarch in ubuntu and gdbserver in the arm-linux target, that will allow you to remote debug programs in the arm target.

Example:

In the target:

target> gdbserver :2345 emacs foo.txt

In the ubuntu machine, start gdb and execute the command:

(gdb) target remote the-target:2345

See the manual for more details: Using the gdbserver program

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.