mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] How to get valgrind working in ptx build
@ 2013-08-07 12:32 jon.bird
  2013-08-07 13:04 ` Marc Kleine-Budde
  2013-08-07 13:10 ` Jürgen Beisert
  0 siblings, 2 replies; 6+ messages in thread
From: jon.bird @ 2013-08-07 12:32 UTC (permalink / raw)
  To: ptxdist

Hello,

I am trying to get valgrind enabled under Ptxdist. I can build the package ok and deploy it however when I attempt to run an app on the target system it fails complaining that it needs debugging symbols from glibc. The suggesion from online is that I either need a non-stripped glibc or an additional file which holds the symbols but it isn't clear from online searching what this file is called or where to locate it in the file system. The toolchain I am using is the OSELAS.Toolchain-2012.12.1 x86 toolchain (prebuilt Debian package), I am hoping I just need to lift the relevant file(s) from there.

Many thanks,


Jon.


--
Jon Bird, CEng MBCS
Software Engineer
Electronic Systems  
General Dynamics United Kingdom Ltd.
Castleham Road, St Leonards on Sea, East Sussex, TN38 9NJ

Telephone: +441424798278  
Email: jon.bird@generaldynamics.uk.com
Website: www.generaldynamics.uk.com      
 

This email and any files attached are intended for the addressee and may contain information of a confidential nature. If you are not the intended recipient, be aware that this email was sent to you in error and you should not disclose, distribute, print, copy or make other use of this email or its attachments. Such actions, in fact, may be unlawful. In compliance with the various Regulations and Acts, General Dynamics United Kingdom Limited reserves the right to monitor (and examine for viruses) all emails and email attachments, both inbound and outbound. Email communications and their attachments may not be secure or error- or virus-free and the company does not accept liability or responsibility for such matters or the consequences thereof. General Dynamics United Kingdom Limited, Registered Office: 21 Holborn Viaduct, London EC1A 2DY. Registered in England and Wales No: 1911653. 

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] How to get valgrind working in ptx build
  2013-08-07 12:32 [ptxdist] How to get valgrind working in ptx build jon.bird
@ 2013-08-07 13:04 ` Marc Kleine-Budde
  2013-08-07 13:10 ` Jürgen Beisert
  1 sibling, 0 replies; 6+ messages in thread
From: Marc Kleine-Budde @ 2013-08-07 13:04 UTC (permalink / raw)
  To: ptxdist; +Cc: jon.bird


[-- Attachment #1.1: Type: text/plain, Size: 1170 bytes --]

On 08/07/2013 02:32 PM, jon.bird@generaldynamics.uk.com wrote:
> I am trying to get valgrind enabled under Ptxdist. I can build the
> package ok and deploy it however when I attempt to run an app on the
> target system it fails complaining that it needs debugging symbols
> from glibc. The suggesion from online is that I either need a
> non-stripped glibc or an additional file which holds the symbols but
> it isn't clear from online searching what this file is called or
> where to locate it in the file system. The toolchain I am using is
> the OSELAS.Toolchain-2012.12.1 x86 toolchain (prebuilt Debian
> package), I am hoping I just need to lift the relevant file(s) from
> there.

Yes you have to use the unstripped version of the glibc, or even better
a completely unstripped system. I suggest to use platform-*/root-debug
as your NFS root file system.

regards,
Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] How to get valgrind working in ptx build
  2013-08-07 12:32 [ptxdist] How to get valgrind working in ptx build jon.bird
  2013-08-07 13:04 ` Marc Kleine-Budde
@ 2013-08-07 13:10 ` Jürgen Beisert
  2013-08-07 13:47   ` jon.bird
  1 sibling, 1 reply; 6+ messages in thread
From: Jürgen Beisert @ 2013-08-07 13:10 UTC (permalink / raw)
  To: ptxdist; +Cc: jon.bird

Hi Jon,

On Wednesday 07 August 2013 14:32:50 jon.bird@generaldynamics.uk.com wrote:
> I am trying to get valgrind enabled under Ptxdist. I can build the package
> ok and deploy it however when I attempt to run an app on the target system
> it fails complaining that it needs debugging symbols from glibc. The
> suggesion from online is that I either need a non-stripped glibc or an
> additional file which holds the symbols but it isn't clear from online
> searching what this file is called or where to locate it in the file
> system. The toolchain I am using is the OSELAS.Toolchain-2012.12.1 x86
> toolchain (prebuilt Debian package), I am hoping I just need to lift the
> relevant file(s) from there.

Sounds like you need to boot via network (NFSroot) and need to use 
the "root-debug" directory instead of the "root" one as the root filesystem.

"root-debug" still contains all debug info.

Debug info for the main glibc is a different issue. This would drastically 
increase the binary, so it is disabled by default.
When building the toolchain you can enable a special menu entry to keep the 
debug info also for glibc (read its help!):

ptxdist menuconfig
  misc                          --->
   [*] debuggable toolchain internals

Regards,
Juergen

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] How to get valgrind working in ptx build
  2013-08-07 13:10 ` Jürgen Beisert
@ 2013-08-07 13:47   ` jon.bird
  2013-08-07 14:20     ` Marc Kleine-Budde
  0 siblings, 1 reply; 6+ messages in thread
From: jon.bird @ 2013-08-07 13:47 UTC (permalink / raw)
  To: ptxdist

Thanks for the replies,

On 07 August 2013 14:11, Jürgen Beisert <mailto:jbe@pengutronix.de> wrote:

> Hi Jon,
> 
> On Wednesday 07 August 2013 14:32:50 jon.bird@generaldynamics.uk.com
> wrote: 
>> I am trying to get valgrind enabled under Ptxdist. I can build the
>> package ok and deploy it however when I attempt to run an app on the
>> target system it fails complaining that it needs debugging symbols
>> from glibc. The suggesion from online is that I either need a
>> non-stripped glibc or an additional file which holds the symbols but
>> it isn't clear from online searching what this file is called or
>> where to locate it in the file system. The toolchain I am using is
>> the OSELAS.Toolchain-2012.12.1 x86 toolchain (prebuilt Debian
>> package), I am hoping I just need to lift the relevant file(s) from
>> there. 
> 
> Sounds like you need to boot via network (NFSroot) and need to use
> the "root-debug" directory instead of the "root" one as the root
> filesystem.  
> 
> "root-debug" still contains all debug info.
> 
> Debug info for the main glibc is a different issue. This would
> drastically increase the binary, so it is disabled by default. 
> When building the toolchain you can enable a special menu entry to
> keep the debug info also for glibc (read its help!): 
> 
> ptxdist menuconfig
>   misc                          --->
>    [*] debuggable toolchain internals
> 

I'll give the nfs-root thing a go but from what you've said it sounds like I need to rebuild the toolchain with debugging enabled.

Rgs,


Jon.




This email and any files attached are intended for the addressee and may contain information of a confidential nature. If you are not the intended recipient, be aware that this email was sent to you in error and you should not disclose, distribute, print, copy or make other use of this email or its attachments. Such actions, in fact, may be unlawful. In compliance with the various Regulations and Acts, General Dynamics United Kingdom Limited reserves the right to monitor (and examine for viruses) all emails and email attachments, both inbound and outbound. Email communications and their attachments may not be secure or error- or virus-free and the company does not accept liability or responsibility for such matters or the consequences thereof. General Dynamics United Kingdom Limited, Registered Office: 21 Holborn Viaduct, London EC1A 2DY. Registered in England and Wales No: 1911653. 
-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] How to get valgrind working in ptx build
  2013-08-07 13:47   ` jon.bird
@ 2013-08-07 14:20     ` Marc Kleine-Budde
  2013-08-08  9:21       ` jon.bird
  0 siblings, 1 reply; 6+ messages in thread
From: Marc Kleine-Budde @ 2013-08-07 14:20 UTC (permalink / raw)
  To: ptxdist; +Cc: jon.bird


[-- Attachment #1.1: Type: text/plain, Size: 2275 bytes --]

On 08/07/2013 03:47 PM, jon.bird@generaldynamics.uk.com wrote:
> Thanks for the replies,
> 
> On 07 August 2013 14:11, Jürgen Beisert <mailto:jbe@pengutronix.de> wrote:
> 
>> Hi Jon,
>>
>> On Wednesday 07 August 2013 14:32:50 jon.bird@generaldynamics.uk.com
>> wrote: 
>>> I am trying to get valgrind enabled under Ptxdist. I can build the
>>> package ok and deploy it however when I attempt to run an app on the
>>> target system it fails complaining that it needs debugging symbols
>>> from glibc. The suggesion from online is that I either need a
>>> non-stripped glibc or an additional file which holds the symbols but
>>> it isn't clear from online searching what this file is called or
>>> where to locate it in the file system. The toolchain I am using is
>>> the OSELAS.Toolchain-2012.12.1 x86 toolchain (prebuilt Debian
>>> package), I am hoping I just need to lift the relevant file(s) from
>>> there. 
>>
>> Sounds like you need to boot via network (NFSroot) and need to use
>> the "root-debug" directory instead of the "root" one as the root
>> filesystem.  
>>
>> "root-debug" still contains all debug info.
>>
>> Debug info for the main glibc is a different issue. This would
>> drastically increase the binary, so it is disabled by default. 
>> When building the toolchain you can enable a special menu entry to
>> keep the debug info also for glibc (read its help!): 
>>
>> ptxdist menuconfig
>>   misc                          --->
>>    [*] debuggable toolchain internals
>>
> 
> I'll give the nfs-root thing a go but from what you've said it sounds
> like I need to rebuild the toolchain with debugging enabled.

You don't have to rebuild the toolchain. The glibc comes with debug
infos already.

However if you want to step into your glibc or c++ code, you need to
have the sources. If you enable this option, the sources will be placed
under /opt, so that the debugger will find them. But this is not needed
in your case.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] How to get valgrind working in ptx build
  2013-08-07 14:20     ` Marc Kleine-Budde
@ 2013-08-08  9:21       ` jon.bird
  0 siblings, 0 replies; 6+ messages in thread
From: jon.bird @ 2013-08-08  9:21 UTC (permalink / raw)
  To: ptxdist

On 07 August 2013 15:20, Marc Kleine-Budde <mailto:mkl@pengutronix.de> wrote:

> On 08/07/2013 03:47 PM, jon.bird@generaldynamics.uk.com wrote:
>> Thanks for the replies,
>> 
>> On 07 August 2013 14:11, Jürgen Beisert <mailto:jbe@pengutronix.de>
>> wrote: 
>> 
>>> Hi Jon,
>>> 
>>> On Wednesday 07 August 2013 14:32:50 jon.bird@generaldynamics.uk.com
>>> wrote:
>>>> I am trying to get valgrind enabled under Ptxdist. I can build the
>>>> package ok and deploy it however when I attempt to run an app on
>>>> the target system it fails complaining that it needs debugging

[...]

>>> 
>> 
>> I'll give the nfs-root thing a go but from what you've said it sounds
>> like I need to rebuild the toolchain with debugging enabled.
> 
> You don't have to rebuild the toolchain. The glibc comes with debug
> infos already. 
> 
> However if you want to step into your glibc or c++ code, you need to
> have the sources. If you enable this option, the sources will be
> placed under /opt, so that the debugger will find them. But this is
> not needed in your case.   
> 
> Marc

NFS mounting the root-debug folder and running the s/w from there allows me to use valgrind now. Thanks for the assistance.

Jon.


This email and any files attached are intended for the addressee and may contain information of a confidential nature. If you are not the intended recipient, be aware that this email was sent to you in error and you should not disclose, distribute, print, copy or make other use of this email or its attachments. Such actions, in fact, may be unlawful. In compliance with the various Regulations and Acts, General Dynamics United Kingdom Limited reserves the right to monitor (and examine for viruses) all emails and email attachments, both inbound and outbound. Email communications and their attachments may not be secure or error- or virus-free and the company does not accept liability or responsibility for such matters or the consequences thereof. General Dynamics United Kingdom Limited, Registered Office: 21 Holborn Viaduct, London EC1A 2DY. Registered in England and Wales No: 1911653. 
-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-08-08  9:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-07 12:32 [ptxdist] How to get valgrind working in ptx build jon.bird
2013-08-07 13:04 ` Marc Kleine-Budde
2013-08-07 13:10 ` Jürgen Beisert
2013-08-07 13:47   ` jon.bird
2013-08-07 14:20     ` Marc Kleine-Budde
2013-08-08  9:21       ` jon.bird

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox