From: Mark Hatle <mark.hatle@windriver.com>
To: Koen Kooi <koen@dominion.thruhere.net>
Cc: poky@yoctoproject.org
Subject: Re: [PATCH 0/4] Revised the debug info patches...
Date: Fri, 11 Feb 2011 10:34:47 -0600 [thread overview]
Message-ID: <4D556527.4090200@windriver.com> (raw)
In-Reply-To: <58483E57-FA87-4779-8E6A-07B3BA8A2675@dominion.thruhere.net>
On 2/11/11 10:15 AM, Koen Kooi wrote:
>
> Op 11 feb 2011, om 16:44 heeft Mark Hatle het volgende geschreven:
>
>> After talking with Richard a bit, I've revised the configuration of the
>> debug info, patch 2 of 4. 1, 3 and 4 remain unchanged.
>>
>> The primary difference is to change the naming from "debian style", and
>> "fedora style" to a more accurate representation based on the GDB
>> documentation and usage I recently found. In addition to the simple
>> name changing, the source code copying is now defined for both styles
>> and simply places the code in /usr/src/debug.
>
> Is there a bbclass planned to populate /usr/src(/debug)? It would help people wanting to do external rebuilds of our (patched) sources.
The two halves of the splitfile function (splitfile and splitfile2) generate the
/usr/src/debug.
In the splitfile, before the files are actually split, a component called
"debugedit" (a standard part of rpm) is run.
os.system("%s'%s' -b '%s' -d '%s' -i -l '%s' '%s'" % (pathprefix, debugedit,
workdir, debugsrcdir, sourcefile, file))
debugedit -b ${WORKDIR} -d '/usr/src/debug' -i -l '${WORKDIR}/debugsources.list'
'<file>'
The debugedit program does two things. The first is it scans the <file> looking
for dwarf source references. Upon finding those references it captures the
original file name (places it into the ${WORKDIR}/debugsources.list), and then
replaces the ${WORKDIR} part of the file name with the /usr/src/debug path.
Later after everything is processed and the debugsources.list contains a full
list of referenced sources the following script is executed:
processdebugsrc = "LC_ALL=C ; sort -z -u '%s' | egrep -v -z
'(<internal>|<built-in>)$' | "
processdebugsrc += "(cd '%s' ; cpio -pd0mL '%s%s' 2>/dev/null)"
os.system(processdebugsrc % (sourcefile, workdir, dvar, debugsrcdir))
In otherwords, we sort the list (null separated), and remove references to gcc
internal and builtin functions. The result of the list is passed to cpio which
performs a copy of all of the referenced files to the dvar/usr/src/debug directory.
----
So that's how it works, and what it does.. As far as a bbclass, it's part of
the standard packaging BBCLASS, I would have thought this could be used, even by
external people given the right inputs to package/repackage external files.
There is nothing Poky specific in this code -- other then it expects the
binaries coming in to not be stripped. (If they are, a warning is issues.)
--Mark
> regards,
>
> Koen
next prev parent reply other threads:[~2011-02-11 16:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-11 15:44 [PATCH 0/4] Revised the debug info patches Mark Hatle
2011-02-11 15:44 ` [PATCH 2/4] Revise stripping and splitting of debug information Mark Hatle
2011-02-11 16:15 ` [PATCH 0/4] Revised the debug info patches Koen Kooi
2011-02-11 16:34 ` Mark Hatle [this message]
2011-02-12 0:36 ` Richard Purdie
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=4D556527.4090200@windriver.com \
--to=mark.hatle@windriver.com \
--cc=koen@dominion.thruhere.net \
--cc=poky@yoctoproject.org \
/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