[poky] [PATCH 0/4] Revised the debug info patches...
Mark Hatle
mark.hatle at windriver.com
Fri Feb 11 08:34:47 PST 2011
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
More information about the poky
mailing list