Anders Darander | 22 Oct 11:47 2009
Picon

[RFC; PATCH] Use gdbserver from external toolchain

Hi,

I've attached a patch (formatted by git), which adds the possibility
to have buildroot install the already compiled gdbserver from an
external toolchain.

To  make sure that debuging works, it is preferred if both the host
crosscompiler gdb and gdbserver is built from the same gdb version. If
we take the gdbserver from the external toolchain, this is guaranteed.

I'm not sure that the implementation is the best, it migth be  a
little bit "hackish". Looking forward to some comments for
improvement.

Regards,
Anders
_______________________________________________
buildroot mailing list
buildroot@...
http://lists.busybox.net/mailman/listinfo/buildroot
Yann E. MORIN | 22 Oct 19:40 2009
Picon

Re: [RFC; PATCH] Use gdbserver from external toolchain

Hello Anders!
Hello All!

On Thursday 22 October 2009 11:47:52 Anders Darander wrote:
> To  make sure that debuging works, it is preferred if both the host
> crosscompiler gdb and gdbserver is built from the same gdb version. If
> we take the gdbserver from the external toolchain, this is guaranteed.

Yes, this is highly suggested that the cross-gdb and the gdbserver are
from the same /version/ of gdb, as they have to speak the same protocol
on the wire, and that can change between releases.

> I'm not sure that the implementation is the best, it migth be  a
> little bit "hackish". Looking forward to some comments for
> improvement.

I'm afraid this is a bit too crosstool-NG centric. OTOH, there's no clean
way to know where in an external toolchain we should look for the gdbserver.

This is some API that crosstool-NG should expose to outside: tell me where
in can find the {gdbserver,duma,whatever} and the corresponding dependencies
(libs, scripts...).

Regards,
Yann E. MORIN.

--

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
(Continue reading)

Lionel Landwerlin | 22 Oct 21:41 2009
Picon

Re: [RFC; PATCH] Use gdbserver from external toolchain

Le jeudi 22 octobre 2009 à 11:47 +0200, Anders Darander a écrit :
> Hi,
> 
> I've attached a patch (formatted by git), which adds the possibility
> to have buildroot install the already compiled gdbserver from an
> external toolchain.
> 
> To  make sure that debuging works, it is preferred if both the host
> crosscompiler gdb and gdbserver is built from the same gdb version. If
> we take the gdbserver from the external toolchain, this is guaranteed.
> 
> I'm not sure that the implementation is the best, it migth be  a
> little bit "hackish". Looking forward to some comments for
> improvement.
> 
> Regards,
> Anders

Hi Anders,

Interesting patch ;)

Maybe you could add

	depends on BR2_TOOLCHAIN_EXTERNAL

to your BR2_TOOLCHAIN_EXTERNAL_GDBSERVER option.

Regards,

(Continue reading)

Thomas Petazzoni | 24 Oct 18:25 2009

Re: [RFC; PATCH] Use gdbserver from external toolchain

Hi,

Le Thu, 22 Oct 2009 11:47:52 +0200,
Anders Darander <anders.darander <at> gmail.com> a écrit :

> I've attached a patch (formatted by git), which adds the possibility
> to have buildroot install the already compiled gdbserver from an
> external toolchain.
> 
> To  make sure that debuging works, it is preferred if both the host
> crosscompiler gdb and gdbserver is built from the same gdb version. If
> we take the gdbserver from the external toolchain, this is guaranteed.
> 
> I'm not sure that the implementation is the best, it migth be  a
> little bit "hackish". Looking forward to some comments for
> improvement.

This feature is of course very welcome, but I'd like to see the
external toolchain support to be extended to toolchains not generated
by Crosstool-NG (Codesourcery toolchains, for example, are still on my
TODO-list).

Can we imagine a way of making this more generic ? Maybe we could
detect the toolchain «type» and act differently depending on this type ?

Sincerly,

Thomas
--

-- 
Thomas Petazzoni, Free Electrons
(Continue reading)

Lionel Landwerlin | 24 Oct 19:41 2009
Picon

Re: [RFC; PATCH] Use gdbserver from external toolchain

Le samedi 24 octobre 2009 à 18:25 +0200, Thomas Petazzoni a écrit :
> Hi,
> 
> Le Thu, 22 Oct 2009 11:47:52 +0200,
> Anders Darander <anders.darander <at> gmail.com> a écrit :
> 
> > I've attached a patch (formatted by git), which adds the possibility
> > to have buildroot install the already compiled gdbserver from an
> > external toolchain.
> > 
> > To  make sure that debuging works, it is preferred if both the host
> > crosscompiler gdb and gdbserver is built from the same gdb version. If
> > we take the gdbserver from the external toolchain, this is guaranteed.
> > 
> > I'm not sure that the implementation is the best, it migth be  a
> > little bit "hackish". Looking forward to some comments for
> > improvement.
> 
> This feature is of course very welcome, but I'd like to see the
> external toolchain support to be extended to toolchains not generated
> by Crosstool-NG (Codesourcery toolchains, for example, are still on my
> TODO-list).
> 
> Can we imagine a way of making this more generic ? Maybe we could
> detect the toolchain «type» and act differently depending on this type ?
> 

What comes up to your mind by "type" ?
Here is a short list to start with :
	1) uclibc vs glibc
(Continue reading)

Yann E. MORIN | 26 Oct 19:08 2009
Picon

Re: [RFC; PATCH] Use gdbserver from external toolchain

Lionel,
All,

On Saturday 24 October 2009 19:41:07 Lionel Landwerlin wrote:
> Le samedi 24 octobre 2009 à 18:25 +0200, Thomas Petazzoni a écrit :
> > Can we imagine a way of making this more generic ? Maybe we could
> > detect the toolchain «type» and act differently depending on this type ?
> What comes up to your mind by "type" ?
> Here is a short list to start with :
> 	1) uclibc vs glibc

I think Thomas was pointing to toolchains coming from different sources and
vendors:
 - crosstool-NG
 - CodeSourcery
 - OSELAS:Toolchain()
 - OpenWRT
 - manually built
 - ...

and not about what the toolchain is based upon ( and in your example, you
were missing eglibc ;-) ).

Regards,
Yann E. MORIN.

--

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
(Continue reading)

Anders Darander | 26 Oct 08:32 2009
Picon

Re: [RFC; PATCH] Use gdbserver from external toolchain

Hi Thomas,

On Sat, Oct 24, 2009 at 17:25, Thomas Petazzoni
<thomas.petazzoni@...> wrote:
> This feature is of course very welcome, but I'd like to see the
> external toolchain support to be extended to toolchains not generated
> by Crosstool-NG (Codesourcery toolchains, for example, are still on my
> TODO-list).

Yes, this would definitely be desirable.

> Can we imagine a way of making this more generic ? Maybe we could
> detect the toolchain «type» and act differently depending on this type ?

Currently I see no way on changing the menuentries depending on the
toolchain type (here I assume type is Crosstool-NG, Codesourcery,
etc...) Thus we will not know if there is any gdbserver in the
toolchain...

However, in the ext-tool.mk, we should be able to at least query the
toolchain for the configuration and parse that information, and decide
from what source the toolchain comes.

I could implement such a feature, although, I'd probably only be able
to verify that it works on a crosstool-NG based toolchain. The
necessary logics for other toolchains will have to be provided by
someone using them.

I'll see if I can squeeze such an implementation into the work
schedule for this week.
(Continue reading)

Anders Darander | 26 Oct 11:22 2009
Picon

Re: [RFC; PATCH v2] Use gdbserver from external toolchain

Hi all,

On Mon, Oct 26, 2009 at 08:32, Anders Darander
<anders.darander@...> wrote:
> Hi Thomas,
>
> On Sat, Oct 24, 2009 at 17:25, Thomas Petazzoni
> <thomas.petazzoni@...> wrote:
>> This feature is of course very welcome, but I'd like to see the
>> external toolchain support to be extended to toolchains not generated
>> by Crosstool-NG (Codesourcery toolchains, for example, are still on my
>> TODO-list).
>
> Yes, this would definitely be desirable.
>
>> Can we imagine a way of making this more generic ? Maybe we could
>> detect the toolchain «type» and act differently depending on this type ?
>
> Currently I see no way on changing the menuentries depending on the
> toolchain type (here I assume type is Crosstool-NG, Codesourcery,
> etc...) Thus we will not know if there is any gdbserver in the
> toolchain...
>
> However, in the ext-tool.mk, we should be able to at least query the
> toolchain for the configuration and parse that information, and decide
> from what source the toolchain comes.

Attached is a version 2 of the patch.

Main differences after feedback:
(Continue reading)

Thomas Petazzoni | 26 Oct 12:16 2009

Re: [RFC; PATCH v2] Use gdbserver from external toolchain

Hi Anders,

Le Mon, 26 Oct 2009 11:22:28 +0100,
Anders Darander <anders.darander <at> gmail.com> a écrit :

> Attached is a version 2 of the patch.

Unless I'm mistaken, I think that you sent the incorrect version of the
patch.

Sincerly,

Thomas
--

-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com
_______________________________________________
buildroot mailing list
buildroot <at> busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Anders Darander | 26 Oct 15:07 2009
Picon

Re: [RFC; PATCH v2] Use gdbserver from external toolchain

Hi Thomas,

On Mon, Oct 26, 2009 at 12:16, Thomas Petazzoni
<thomas.petazzoni@...> wrote:
> Hi Anders,
>
> Le Mon, 26 Oct 2009 11:22:28 +0100,
> Anders Darander <anders.darander@...> a écrit :
>
>> Attached is a version 2 of the patch.
>
> Unless I'm mistaken, I think that you sent the incorrect version of the
> patch.

I've checked the sent mail, and the attachement in my last mail is
indeed the new patch. I should probably have updated the headers in
the patch-file from git.
(On and off, I'm still struggling a little bit with git format-patch.
Currently it seems that git keeps my original date and time of the
patch...).

Regards,
Anders
Anders Darander | 26 Oct 15:26 2009
Picon

Re: [RFC; PATCH v2] Use gdbserver from external toolchain

Hi all,

On Mon, Oct 26, 2009 at 15:07, Anders Darander
<anders.darander@...> wrote:
> I've checked the sent mail, and the attachement in my last mail is
> indeed the new patch. I should probably have updated the headers in
> the patch-file from git.
> (On and off, I'm still struggling a little bit with git format-patch.
> Currently it seems that git keeps my original date and time of the
> patch...).

Attached is a newly generated patch-file, with new timestamps. To
better fit in with the git tree it is based on.

--

-- 
Anders Darander
_______________________________________________
buildroot mailing list
buildroot@...
http://lists.busybox.net/mailman/listinfo/buildroot
Yann E. MORIN | 26 Oct 19:12 2009
Picon

Re: [RFC; PATCH] Use gdbserver from external toolchain

Hello all!

On Saturday 24 October 2009 18:25:38 Thomas Petazzoni wrote:
> Le Thu, 22 Oct 2009 11:47:52 +0200,
> Anders Darander <anders.darander <at> gmail.com> a écrit :
> > I've attached a patch (formatted by git), which adds the possibility
> > to have buildroot install the already compiled gdbserver from an
> > external toolchain.
> This feature is of course very welcome, but I'd like to see the
> external toolchain support to be extended to toolchains not generated
> by Crosstool-NG (Codesourcery toolchains, for example, are still on my
> TODO-list).

Yes, the idea is nice, and having a generic way to get such info is
most wanted. Unfortunately, I'm afraid that most toolchains will not
provide such means (of course we can try to push it, and it will be
easier for some than for others).

> Can we imagine a way of making this more generic ? Maybe we could
> detect the toolchain «type» and act differently depending on this
> type ? 

Hmmm... That would require quite some knowledge about the toolchain
generators, and each may change paths as they see fit, and we'd be
lagging behind very quickly...

Regards,
Yann E. MORIN.

--

-- 
(Continue reading)


Gmane