Re: [ptxdist] Gdb debugging helper [PATCH]
Hi Ruben Am Freitag, 11. Januar 2013, 10:47:07 schrieb Ruben Louw: hmm. makes sense to be on host. But I think this should be included when build the toolchain or something, I'm only speculating. but i'll play around with it, hopefully smoke does'nt come out anywhere. Its the Toolchain. You need the following change in the toolchain. I would suggest to have this enabled by default, while we are at it. Best regards Tim diff --git a/toolchain/OSELAS.Toolchain-2011.03.1/rules/cross-gdb.make b/toolchain/OSELAS.Toolchain-2011.03.1/rules/cross-gdb.make index 727de25..8c1ffdc 100644 --- a/toolchain/OSELAS.Toolchain-2011.03.1/rules/cross-gdb.make +++ b/toolchain/OSELAS.Toolchain-2011.03.1/rules/cross-gdb.make @@ -63,6 +63,7 @@ CROSS_GDB_AUTOCONF := \ $(PTXCONF_TOOLCHAIN_CONFIG_SYSROOT) \ \ --disable-werror \ + --enable-python \ --enable-tui $(STATEDIR)/cross-gdb.prepare: -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] Gdb debugging helper [PATCH]
Hi Tim Thanks for the advice. Just to be sure. Python was not enabled (default) then as the helper? Could it be I was correct? So then I need to rebuild the toolchain, with Python enabled (example below)? Or is there a quick hack for me to try without rebuilding the toolchain, cos then I have to rebuild everything and I just want to quick test if this is the solution. Do I understand this correctly, or am I way off? Thanks! Ruben On Fri, Jan 11, 2013 at 11:42 AM, Tim Sander t...@krieglstein.org wrote: Hi Ruben Am Freitag, 11. Januar 2013, 10:47:07 schrieb Ruben Louw: hmm. makes sense to be on host. But I think this should be included when build the toolchain or something, I'm only speculating. but i'll play around with it, hopefully smoke does'nt come out anywhere. Its the Toolchain. You need the following change in the toolchain. I would suggest to have this enabled by default, while we are at it. Best regards Tim diff --git a/toolchain/OSELAS.Toolchain-2011.03.1/rules/cross-gdb.make b/toolchain/OSELAS.Toolchain-2011.03.1/rules/cross-gdb.make index 727de25..8c1ffdc 100644 --- a/toolchain/OSELAS.Toolchain-2011.03.1/rules/cross-gdb.make +++ b/toolchain/OSELAS.Toolchain-2011.03.1/rules/cross-gdb.make @@ -63,6 +63,7 @@ CROSS_GDB_AUTOCONF := \ $(PTXCONF_TOOLCHAIN_CONFIG_SYSROOT) \ \ --disable-werror \ + --enable-python \ --enable-tui $(STATEDIR)/cross-gdb.prepare: -- ptxdist mailing list ptxdist@pengutronix.de -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] Gdb debugging helper [PATCH]
Hi Ruben Thanks for the advice. Just to be sure. Python was not enabled (default) then as the helper? Could it be I was correct? So then I need to rebuild the toolchain, with Python enabled (example below)? Or is there a quick hack for me to try without rebuilding the toolchain, cos then I have to rebuild everything and I just want to quick test if this is the solution. It was not enabled for the older toolchains (2011.03.1) and is is enabled for 2011.11.3. Just take a look at rules/cross-gdb.make Best regards Tim -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] Gdb debugging helper [PATCH]
Hi Tim I currently use 2012.12.0. I hd a look in cross-gdb.make, and the --enable-python line is not there. So I added it. Do i have to rebuild the toolchain after adding this line? Thank you Ruben On Fri, Jan 11, 2013 at 2:27 PM, Tim Sander t...@krieglstein.org wrote: Hi Ruben Thanks for the advice. Just to be sure. Python was not enabled (default) then as the helper? Could it be I was correct? So then I need to rebuild the toolchain, with Python enabled (example below)? Or is there a quick hack for me to try without rebuilding the toolchain, cos then I have to rebuild everything and I just want to quick test if this is the solution. It was not enabled for the older toolchains (2011.03.1) and is is enabled for 2011.11.3. Just take a look at rules/cross-gdb.make Best regards Tim -- ptxdist mailing list ptxdist@pengutronix.de -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] Gdb debugging helper [PATCH]
Hi, On Fri, Jan 11, 2013 at 12:57:45PM +0200, Ruben Louw wrote: Thanks for the advice. Just to be sure. Python was not enabled (default) then as the helper? Could it be I was correct? So then I need to rebuild the toolchain, with Python enabled (example below)? Or is there a quick hack for me to try without rebuilding the toolchain, cos then I have to rebuild everything and I just want to quick test if this is the solution. Do I understand this correctly, or am I way off? The default is autodetect. Run 'readelf -d /path/to/toolchain/bin/prefix-gdb' and see if it links to libpython2.7.so.1.0 or something like that. If not, then you need to istall python-dev or something like that. Michael -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] Gdb debugging helper [PATCH]
Hi Tim I'm trying to get my mind wrapped around this. I ran your command and this is what it outputs: Dynamic section at offset 0x3f1df8 contains 25 entries: TagType Name/Value 0x0001 (NEEDED) Shared library: [libdl.so.2] 0x0001 (NEEDED) Shared library: [libncurses.so.5] 0x0001 (NEEDED) Shared library: [libtinfo.so.5] 0x0001 (NEEDED) Shared library: [libm.so.6] 0x0001 (NEEDED) Shared library: [libc.so.6] 0x000f (RPATH) Library rpath: [/home/orbit/OSELAS.Toolchain-2012.12.0/platform-arm-v4t-linux-gnueabi-gcc-4.7.2-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/sysroot-host/lib:/this/is/a/long/path/to/make/host/tools/relocateable/with/chrpath/when/using/dev/packages] 0x000c (INIT) 0x4046b0 0x000d (FINI) 0x6a0218 0x6ef5 (GNU_HASH) 0x400298 0x0005 (STRTAB) 0x401e88 0x0006 (SYMTAB) 0x400388 0x000a (STRSZ) 2803 (bytes) 0x000b (SYMENT) 24 (bytes) 0x0015 (DEBUG) 0x0 0x0003 (PLTGOT) 0x9f1fe8 0x0002 (PLTRELSZ) 6312 (bytes) 0x0014 (PLTREL) RELA 0x0017 (JMPREL) 0x402e08 0x0007 (RELA) 0x402ca0 0x0008 (RELASZ) 360 (bytes) 0x0009 (RELAENT)24 (bytes) 0x6ffe (VERNEED)0x402bc0 0x6fff (VERNEEDNUM) 3 0x6ff0 (VERSYM) 0x40297c 0x (NULL) 0x0 its not linking to Python right? if i then install python, do i have to make the link myself? Thanks Ruben On Fri, Jan 11, 2013 at 2:30 PM, Michael Olbrich m.olbr...@pengutronix.dewrote: Hi, On Fri, Jan 11, 2013 at 12:57:45PM +0200, Ruben Louw wrote: Thanks for the advice. Just to be sure. Python was not enabled (default) then as the helper? Could it be I was correct? So then I need to rebuild the toolchain, with Python enabled (example below)? Or is there a quick hack for me to try without rebuilding the toolchain, cos then I have to rebuild everything and I just want to quick test if this is the solution. Do I understand this correctly, or am I way off? The default is autodetect. Run 'readelf -d /path/to/toolchain/bin/prefix-gdb' and see if it links to libpython2.7.so.1.0 or something like that. If not, then you need to istall python-dev or something like that. Michael -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | -- ptxdist mailing list ptxdist@pengutronix.de -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] Gdb debugging helper [PATCH]
sorry, I meant Michael. On Fri, Jan 11, 2013 at 2:37 PM, Ruben Louw lfxc...@gmail.com wrote: Hi Tim I'm trying to get my mind wrapped around this. I ran your command and this is what it outputs: Dynamic section at offset 0x3f1df8 contains 25 entries: TagType Name/Value 0x0001 (NEEDED) Shared library: [libdl.so.2] 0x0001 (NEEDED) Shared library: [libncurses.so.5] 0x0001 (NEEDED) Shared library: [libtinfo.so.5] 0x0001 (NEEDED) Shared library: [libm.so.6] 0x0001 (NEEDED) Shared library: [libc.so.6] 0x000f (RPATH) Library rpath: [/home/orbit/OSELAS.Toolchain-2012.12.0/platform-arm-v4t-linux-gnueabi-gcc-4.7.2-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/sysroot-host/lib:/this/is/a/long/path/to/make/host/tools/relocateable/with/chrpath/when/using/dev/packages] 0x000c (INIT) 0x4046b0 0x000d (FINI) 0x6a0218 0x6ef5 (GNU_HASH) 0x400298 0x0005 (STRTAB) 0x401e88 0x0006 (SYMTAB) 0x400388 0x000a (STRSZ) 2803 (bytes) 0x000b (SYMENT) 24 (bytes) 0x0015 (DEBUG) 0x0 0x0003 (PLTGOT) 0x9f1fe8 0x0002 (PLTRELSZ) 6312 (bytes) 0x0014 (PLTREL) RELA 0x0017 (JMPREL) 0x402e08 0x0007 (RELA) 0x402ca0 0x0008 (RELASZ) 360 (bytes) 0x0009 (RELAENT)24 (bytes) 0x6ffe (VERNEED)0x402bc0 0x6fff (VERNEEDNUM) 3 0x6ff0 (VERSYM) 0x40297c 0x (NULL) 0x0 its not linking to Python right? if i then install python, do i have to make the link myself? Thanks Ruben On Fri, Jan 11, 2013 at 2:30 PM, Michael Olbrich m.olbr...@pengutronix.de wrote: Hi, On Fri, Jan 11, 2013 at 12:57:45PM +0200, Ruben Louw wrote: Thanks for the advice. Just to be sure. Python was not enabled (default) then as the helper? Could it be I was correct? So then I need to rebuild the toolchain, with Python enabled (example below)? Or is there a quick hack for me to try without rebuilding the toolchain, cos then I have to rebuild everything and I just want to quick test if this is the solution. Do I understand this correctly, or am I way off? The default is autodetect. Run 'readelf -d /path/to/toolchain/bin/prefix-gdb' and see if it links to libpython2.7.so.1.0 or something like that. If not, then you need to istall python-dev or something like that. Michael -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-| -- ptxdist mailing list ptxdist@pengutronix.de -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] Gdb debugging helper [PATCH]
Hi Ruben, Ruben Louw wrote: I currently use 2012.12.0. I hd a look in cross-gdb.make, and the --enable-python line is not there. So I added it. Do i have to rebuild the toolchain after adding this line? Maybe you can try with a ptxdist clean cross-gdb; ptxdist go (=partially rebuild). If this does not work, you must rebuild the whole toolchain. Regards Juergen -- Pengutronix e.K. | Juergen Beisert | Linux Solutions for Science and Industry | http://www.pengutronix.de/ | -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] Gdb debugging helper [PATCH]
On Fri, Jan 11, 2013 at 02:37:01PM +0200, Ruben Louw wrote: I'm trying to get my mind wrapped around this. I ran your command and this is what it outputs: Dynamic section at offset 0x3f1df8 contains 25 entries: TagType Name/Value 0x0001 (NEEDED) Shared library: [libdl.so.2] 0x0001 (NEEDED) Shared library: [libncurses.so.5] 0x0001 (NEEDED) Shared library: [libtinfo.so.5] 0x0001 (NEEDED) Shared library: [libm.so.6] 0x0001 (NEEDED) Shared library: [libc.so.6] [...] its not linking to Python right? Correct. if i then install python, do i have to make the link myself? 1. Install whatever packages provides Python.h in your distro (python-dev in Debian). 2. Rebuild the toolchain, or just part of if as Juergen suggested. Python support is automatically enabled if found. Michael -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] Gdb debugging helper [PATCH]
Thanks Michael Thats what you meant by it installs it if it can find the headers, right? so if i have python-dev installed on my host, and python is enabled in cross-gdb.make, then it will link python and all that, right? On Fri, Jan 11, 2013 at 3:00 PM, Michael Olbrich m.olbr...@pengutronix.dewrote: On Fri, Jan 11, 2013 at 02:37:01PM +0200, Ruben Louw wrote: I'm trying to get my mind wrapped around this. I ran your command and this is what it outputs: Dynamic section at offset 0x3f1df8 contains 25 entries: TagType Name/Value 0x0001 (NEEDED) Shared library: [libdl.so.2] 0x0001 (NEEDED) Shared library: [libncurses.so.5] 0x0001 (NEEDED) Shared library: [libtinfo.so.5] 0x0001 (NEEDED) Shared library: [libm.so.6] 0x0001 (NEEDED) Shared library: [libc.so.6] [...] its not linking to Python right? Correct. if i then install python, do i have to make the link myself? 1. Install whatever packages provides Python.h in your distro (python-dev in Debian). 2. Rebuild the toolchain, or just part of if as Juergen suggested. Python support is automatically enabled if found. Michael -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | -- ptxdist mailing list ptxdist@pengutronix.de -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] Gdb debugging helper [PATCH]
Hi Ruben, Ruben Louw wrote: How do I partially rebuild the cross-gdb package? With the commands I mentioned. If you have kept your already built OSELAS.Toolchain-2012.12.0 build directory, with ptxdist clean package name; ptxdist go you can force the re-build of the package package name. it keeps downloading stuff. ??? Should i remove the previous toolchain before rebuilding it, if so, how do i remove it? If you really want to start from scratch: ~$ rm -rf /opt/OSELAS.Toolchain-2012.12.0/your toolchain to remove ~/OSELAS.Toolchain-2012.12.0$ ptxdist clean ~/OSELAS.Toolchain-2012.12.0$ ptxdist go And then go for a walk. :) Regards, Juergen -- Pengutronix e.K. | Juergen Beisert | Linux Solutions for Science and Industry | http://www.pengutronix.de/ | -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] Gdb debugging helper [PATCH]
Hi, On Fri, Jan 11, 2013 at 03:02:50PM +0200, Ruben Louw wrote: Thats what you meant by it installs it if it can find the headers, right? so if i have python-dev installed on my host, and python is enabled in cross-gdb.make, then it will link python and all that, right? Actually, you don't need to modify cross-gdb.make. The rest is correct. Michael -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] Gdb debugging helper [PATCH]
So all I have to do is just install python-dev then right? it'll then pick everything up automatically. On Fri, Jan 11, 2013 at 3:18 PM, Michael Olbrich m.olbr...@pengutronix.dewrote: Hi, On Fri, Jan 11, 2013 at 03:02:50PM +0200, Ruben Louw wrote: Thats what you meant by it installs it if it can find the headers, right? so if i have python-dev installed on my host, and python is enabled in cross-gdb.make, then it will link python and all that, right? Actually, you don't need to modify cross-gdb.make. The rest is correct. Michael -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | -- ptxdist mailing list ptxdist@pengutronix.de -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] Gdb debugging helper [PATCH]
Nevermind my reply, I'll rebuild. Thanks guys On Fri, Jan 11, 2013 at 3:20 PM, Ruben Louw lfxc...@gmail.com wrote: So all I have to do is just install python-dev then right? it'll then pick everything up automatically. On Fri, Jan 11, 2013 at 3:18 PM, Michael Olbrich m.olbr...@pengutronix.de wrote: Hi, On Fri, Jan 11, 2013 at 03:02:50PM +0200, Ruben Louw wrote: Thats what you meant by it installs it if it can find the headers, right? so if i have python-dev installed on my host, and python is enabled in cross-gdb.make, then it will link python and all that, right? Actually, you don't need to modify cross-gdb.make. The rest is correct. Michael -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-| -- ptxdist mailing list ptxdist@pengutronix.de -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] Gdb debugging helper [PATCH]
Hi Michael The default is autodetect. Run 'readelf -d /path/to/toolchain/bin/prefix-gdb' and see if it links to libpython2.7.so.1.0 or something like that. If not, then you need to istall python-dev or something like that. I have python-dev installed, nevertheless i had to add --enable-python, at l last in the 2011.03.1 toolchain, and probably i have added this line also to the 2011.11.3 toolchain after i add it to my git repo... So with ubuntu 12.04 64bit i had to add this enable-python flag. Maybe autodetection is not working correctly? Best regards Tim -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] Gdb debugging helper [PATCH]
Hi Ruben, please don't forget the mailing list :) Ruben Louw wrote: thanks Juergen You're welcome. That was my problem, I removed the already built Toolchain that was in my home directory. Now it wants to download everything. Setup PTXdist to use a special directory for the downloaded archives. Then the download happens only once. Oh well, mental note to self, dont just remove stuff. I walk seems like a great idea, would rather buy you, Tim and Michael a beer ;) Thanks for all your help guys. Regards Juergen -- Pengutronix e.K. | Juergen Beisert | Linux Solutions for Science and Industry | http://www.pengutronix.de/ | -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] Gdb debugging helper [PATCH]
thanks Juergen That was my problem, I removed the already built Toolchain that was in my home directory. Now it wants to download everything. Oh well, mental note to self, dont just remove stuff. I walk seems like a great idea, would rather buy you, Tim and Michael a beer ;) Thanks for all your help guys. Regards Ruben On Fri, Jan 11, 2013 at 3:12 PM, Juergen Beisert j...@pengutronix.de wrote: Hi Ruben, Ruben Louw wrote: How do I partially rebuild the cross-gdb package? With the commands I mentioned. If you have kept your already built OSELAS.Toolchain-2012.12.0 build directory, with ptxdist clean package name; ptxdist go you can force the re-build of the package package name. it keeps downloading stuff. ??? Should i remove the previous toolchain before rebuilding it, if so, how do i remove it? If you really want to start from scratch: ~$ rm -rf /opt/OSELAS.Toolchain-2012.12.0/your toolchain to remove ~/OSELAS.Toolchain-2012.12.0$ ptxdist clean ~/OSELAS.Toolchain-2012.12.0$ ptxdist go And then go for a walk. :) Regards, Juergen -- Pengutronix e.K. | Juergen Beisert | Linux Solutions for Science and Industry | http://www.pengutronix.de/ | -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] Gdb debugging helper [PATCH]
Appologies for doing it again. keep forgetting, crap. Will setup a directory like that, or i wont just remove stuff. Thanks On Fri, Jan 11, 2013 at 3:25 PM, Juergen Beisert j...@pengutronix.de wrote: Hi Ruben, please don't forget the mailing list :) Ruben Louw wrote: thanks Juergen You're welcome. That was my problem, I removed the already built Toolchain that was in my home directory. Now it wants to download everything. Setup PTXdist to use a special directory for the downloaded archives. Then the download happens only once. Oh well, mental note to self, dont just remove stuff. I walk seems like a great idea, would rather buy you, Tim and Michael a beer ;) Thanks for all your help guys. Regards Juergen -- Pengutronix e.K. | Juergen Beisert | Linux Solutions for Science and Industry | http://www.pengutronix.de/ | -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] Gdb debugging helper [PATCH]
Hi Tim I have python-dev installed, nevertheless i had to add --enable-python, at l last in the 2011.03.1 toolchain, and probably i have added this line also to the 2011.11.3 toolchain after i add it to my git repo... So with ubuntu 12.04 64bit i had to add this enable-python flag. Maybe autodetection is not working correctly? Just out of interest, what language and ide are you using for your development? Regards Ruben On Fri, Jan 11, 2013 at 3:33 PM, Ruben Louw lfxc...@gmail.com wrote: Appologies for doing it again. keep forgetting, crap. Will setup a directory like that, or i wont just remove stuff. Thanks On Fri, Jan 11, 2013 at 3:25 PM, Juergen Beisert j...@pengutronix.dewrote: Hi Ruben, please don't forget the mailing list :) Ruben Louw wrote: thanks Juergen You're welcome. That was my problem, I removed the already built Toolchain that was in my home directory. Now it wants to download everything. Setup PTXdist to use a special directory for the downloaded archives. Then the download happens only once. Oh well, mental note to self, dont just remove stuff. I walk seems like a great idea, would rather buy you, Tim and Michael a beer ;) Thanks for all your help guys. Regards Juergen -- Pengutronix e.K. | Juergen Beisert | Linux Solutions for Science and Industry | http://www.pengutronix.de/ | -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] Gdb debugging helper [PATCH]
Ruben Louw wrote: Appologies for doing it again. keep forgetting, crap. :) jbe -- Pengutronix e.K. | Juergen Beisert | Linux Solutions for Science and Industry | http://www.pengutronix.de/ | -- ptxdist mailing list ptxdist@pengutronix.de