Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] gdbserver with external crosstool
Date: Fri, 24 Aug 2012 11:34:18 +0200	[thread overview]
Message-ID: <20120824113418.18b14077@skate> (raw)
In-Reply-To: <CAJkQPOknYkU=jGjpS2B+b+DUYLNPq6NX-muxC04BBSKbbhGcLA@mail.gmail.com>

Hello,

Le Thu, 23 Aug 2012 09:45:35 +0100,
Aras Vaichas <aras.vaichas@gmail.com> a ?crit :

> I've got a question about building gdbserver when an external
> toolchain is selected.
> 
> in toolchain/gdb/Config.in:
> 
> config BR2_PACKAGE_GDB_SERVER
>         bool "Build gdb server for the Target"
>         depends on !BR2_TOOLCHAIN_EXTERNAL
>         help
>             Build the gdbserver stub to run on the target.
>             A full gdb is needed to debug the progam.
> 
> Why doesn't Buildroot build gdbserver when an external toolchain is selected?

Because for external toolchains, we assume that the gdbserver must be
provided by the external toolchain, together with the cross-gdb.

There are two reasons:

 1. Most pre-built external toolchains available out there provide both
    their own cross-gdb and gdbserver, so it makes sense to use them.

 2. Experience has shown that if there is a version difference between
    the cross-gdb and the gdbserver, there are often problems.
    Therefore, we really want people using external toolchains to use
    the provided gdbserver with their external toolchain rather than
    build their own.

> I noticed that both gdbserver and gdb are built (with the external
> toolchain) by Buildroot, but only gdb is copied over to the target.

I'm a bit confused: are you talking about the cross gdb or the target
gdb? When using an external toolchain, what we except people to do is:

 *) Use the cross-gdb provided pre-built by their external toolchain

 *) Use the BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY option so that the
 gdbserver provided pre-built by their external toolchain is copied to
 the target filesystem

 *) Optionally (but not really useful or recommended), they can enable
 the gdb package, which will build a full-blown gdb for the target,
 installed in the target filesystem. But that's a completely different
 thing than cross-gdb+gdbserver.

> I see that BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY allows the gdbserver
> from the external toolchain to be copied over.

Yes.

> So why doesn't Buildroot allow me to copy over the gdbserver that I
> built within Buildroot?

I'm confused again. Can you explain what you're doing exactly? In the
previous paragraph, you precisely said that there was an option to copy
gdbserver to the target filesystem, and now you're saying that there
isn't such an option. Are you talking about two different
configurations maybe?

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

  reply	other threads:[~2012-08-24  9:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-23  8:45 [Buildroot] gdbserver with external crosstool Aras Vaichas
2012-08-24  9:34 ` Thomas Petazzoni [this message]
2012-08-24 10:22   ` Aras Vaichas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120824113418.18b14077@skate \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox