Message ID | 20231101110129.647878-4-adrian.freihofer@siemens.com |
---|---|
State | New |
Headers | show |
Series | devtool ide plugin | expand |
On Wed, 2023-11-01 at 12:01 +0100, Adrian Freihofer wrote: > Remove the image-combined-dbg.bbclass and make this the default > behavior for the rootfs-dbg. A rootfs-dbg with only debug symbols but > no executable binaries also causes problems with gdb, which is > probably the most common use case for the roofs-dbg. This change > simplifies and improves the user experience for a slightly larger > rootfs-dbg. > > If the rootfs-dbg contains a complete copy of the rootfs, it is also > usable for booting the target device over the network. This in turn > simplifies other use cases with e.g. the use of perf on a device > booted over the network. > > Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> I'm being pressured for review on this so I'll just say what the problem is. I struggle to review this as off the top of my head, I can't remember the difference between "rootfs-dbg" or "image-combined- dbg". I understand the patch gets rid of one and the argument appears to be that gdb doesn't work well with the case that is removed. What isn't here is any reminder of what the differences are, or a pointer to the history which lead us to have two different modes in the first place. We presumably had a reason for adding it. That means in order to review it, I'd have to dig into the history and work out the differences, then work out why we added the two modes and then determine if they're still needed. What would help speed up review would be a pointer to the original commits and/or a summary of why the were added. A summary of the differences between the two modes would also help/ Cheers, Richard
On Mon, 2023-11-06 at 13:50 +0000, Richard Purdie wrote: > On Wed, 2023-11-01 at 12:01 +0100, Adrian Freihofer wrote: > > Remove the image-combined-dbg.bbclass and make this the default > > behavior for the rootfs-dbg. A rootfs-dbg with only debug symbols > > but > > no executable binaries also causes problems with gdb, which is > > probably the most common use case for the roofs-dbg. This change > > simplifies and improves the user experience for a slightly larger > > rootfs-dbg. > > > > If the rootfs-dbg contains a complete copy of the rootfs, it is > > also > > usable for booting the target device over the network. This in turn > > simplifies other use cases with e.g. the use of perf on a device > > booted over the network. > > > > Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> > > I'm being pressured for review on this so I'll just say what the > problem is. I struggle to review this as off the top of my head, I > can't remember the difference between "rootfs-dbg" or "image- > combined- > dbg". I understand the patch gets rid of one and the argument appears > to be that gdb doesn't work well with the case that is removed. > > What isn't here is any reminder of what the differences are, or a > pointer to the history which lead us to have two different modes in > the > first place. We presumably had a reason for adding it. > > That means in order to review it, I'd have to dig into the history > and > work out the differences, then work out why we added the two modes > and > then determine if they're still needed. > > What would help speed up review would be a pointer to the original > commits and/or a summary of why the were added. A summary of the > differences between the two modes would also help/ > We have tried to work through the git history and to search for use cases that rely on the old implementation. The git history does not explain why it is like it is. Enguerrand came up with theoretical use cases where the rootfs-dbg could be mounted somehow as overlay at run-time. I can't rule out the possibility of someone doing something like that. Maybe we should keep that as it is. @Ross: do you have a different opinion regarding the discussion we had: https://lists.openembedded.org/g/openembedded-core/message/188995 Here are my notes. Just in case we would like to come back to this some when. - 7a7c6b021f114c6bedfbdc9afd2bf2925b238d19: The first implementation of rootfs-dbg only added the *-dbg packages and the package database. - 69d3df9169133d5e05eff25019569fb8974d48c2 - c1ce0d9a9e200e35a9b6f9d537232875683ab9f1 - e73a85be3e020561db92a197c593afe7fd952919 - 1800b1ba7ae07cd010e529653eaa1d7a5841e6e5 Added some workarounds related to opkg and openssl which got finally reverted again. - 364c4c7d3fc049f2b734a6a235758a75af364ce0 Support for PACKAGE_DEBUG_SPLIT_STYLE= 'debug-with-srcpkg' - 5f30534c47571d199d8655b3da51f7b55fe20c04 Introduce IMAGE_INSTALL_DEBUGFS - 18f080fbe4cf51824e5f1d73a10e06e3a5724423 Removes the package database later, as it caused problems with RPMs. Comparison of $ tar xvfj core-image-minimal-qemux86-64.rootfs.tar.bz2 $ tar xvfj core-image-minimal-qemux86-64.rootfs-dbg.tar.bz2 without this patch verus $ tar xvfj core-image-minimal-qemux86-64.rootfs-dbg.tar.bz2 with this patch applied shows some differences. This is expected because some of the post rootfs steps run after rootfs gets copied to rootfs-dbg. Changing this would require more changes. $ diff -r --no-dereference debug-fs1 debug-fs2 Only in debug-fs1/etc/default: postinst Only in debug-fs2/etc/init.d: run-postinsts diff -r --no-dereference debug-fs1/etc/issue debug-fs2/etc/issue 1c1 < Poky (Yocto Project Reference Distro) 4.3+snapshot- bc66d6ea4b3a6e6c9131295ee0783b88b5a90a02 \n \l --- > Poky (Yocto Project Reference Distro) 4.3+snapshot- 44ec9356d2d8686189531b55b2bd2b268b5dffa3 \n \l diff -r --no-dereference debug-fs1/etc/issue.net debug- fs2/etc/issue.net 1c1 < Poky (Yocto Project Reference Distro) 4.3+snapshot- bc66d6ea4b3a6e6c9131295ee0783b88b5a90a02 %h --- > Poky (Yocto Project Reference Distro) 4.3+snapshot- 44ec9356d2d8686189531b55b2bd2b268b5dffa3 %h Only in debug-fs1/etc: ld.so.cache Only in debug-fs2/etc/rcS.d: S99run-postinsts Only in debug-fs1/etc: timestamp Only in debug-fs1/etc: version Only in debug-fs2/usr/sbin: run-postinsts Only in debug-fs2/var/volatile: log Only in debug-fs2/var/volatile: tmp Best reagrds, Adrian > Cheers, > > Richard > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#190217): > https://lists.openembedded.org/g/openembedded-core/message/190217 > Mute This Topic: https://lists.openembedded.org/mt/102316026/4454582 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: > https://lists.openembedded.org/g/openembedded-core/unsub [ > adrian.freihofer@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
Can you explain your issues with gdb with using a rootfs-dbg, because I don’t see any problem with a filesystem that only contains debug symbols, given how easily gdb can be configured to look into alternate paths. I’ll admit I also don’t know the difference between these modes, and also wonder how IMAGE_GEN_DEBUGFS relates. -- Christopher Larson chris_larson@mentor.com, chris.larson@siemens.com, kergoth@gmail.com Principal Software Engineer, Embedded Linux Solutions, Siemens Digital Industries Software On Nov 15, 2023 at 7:21 AM -0700, Adrian Freihofer <adrian.freihofer@gmail.com>, wrote: > On Mon, 2023-11-06 at 13:50 +0000, Richard Purdie wrote: > > On Wed, 2023-11-01 at 12:01 +0100, Adrian Freihofer wrote: > > > Remove the image-combined-dbg.bbclass and make this the default > > > behavior for the rootfs-dbg. A rootfs-dbg with only debug symbols > > > but > > > no executable binaries also causes problems with gdb, which is > > > probably the most common use case for the roofs-dbg. This change > > > simplifies and improves the user experience for a slightly larger > > > rootfs-dbg. > > > > > > If the rootfs-dbg contains a complete copy of the rootfs, it is > > > also > > > usable for booting the target device over the network. This in turn > > > simplifies other use cases with e.g. the use of perf on a device > > > booted over the network. > > > > > > Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> > > > > I'm being pressured for review on this so I'll just say what the > > problem is. I struggle to review this as off the top of my head, I > > can't remember the difference between "rootfs-dbg" or "image- > > combined- > > dbg". I understand the patch gets rid of one and the argument appears > > to be that gdb doesn't work well with the case that is removed. > > > > What isn't here is any reminder of what the differences are, or a > > pointer to the history which lead us to have two different modes in > > the > > first place. We presumably had a reason for adding it. > > > > That means in order to review it, I'd have to dig into the history > > and > > work out the differences, then work out why we added the two modes > > and > > then determine if they're still needed. > > > > What would help speed up review would be a pointer to the original > > commits and/or a summary of why the were added. A summary of the > > differences between the two modes would also help/ > > > > We have tried to work through the git history and to search for use > cases that rely on the old implementation. The git history does not > explain why it is like it is. > > Enguerrand came up with theoretical use cases where the rootfs-dbg > could be mounted somehow as overlay at run-time. I can't rule out the > possibility of someone doing something like that. > > Maybe we should keep that as it is. > > @Ross: do you have a different opinion regarding the discussion we had: > https://lists.openembedded.org/g/openembedded-core/message/188995 > > > Here are my notes. Just in case we would like to come back to this some > when. > > - 7a7c6b021f114c6bedfbdc9afd2bf2925b238d19: > The first implementation of rootfs-dbg only added the *-dbg packages > and the package database. > - 69d3df9169133d5e05eff25019569fb8974d48c2 > - c1ce0d9a9e200e35a9b6f9d537232875683ab9f1 > - e73a85be3e020561db92a197c593afe7fd952919 > - 1800b1ba7ae07cd010e529653eaa1d7a5841e6e5 > Added some workarounds related to opkg and openssl which got finally > reverted again. > - 364c4c7d3fc049f2b734a6a235758a75af364ce0 > Support for PACKAGE_DEBUG_SPLIT_STYLE= 'debug-with-srcpkg' > - 5f30534c47571d199d8655b3da51f7b55fe20c04 > Introduce IMAGE_INSTALL_DEBUGFS > - 18f080fbe4cf51824e5f1d73a10e06e3a5724423 > Removes the package database later, as it caused problems with RPMs. > > Comparison of > $ tar xvfj core-image-minimal-qemux86-64.rootfs.tar.bz2 > $ tar xvfj core-image-minimal-qemux86-64.rootfs-dbg.tar.bz2 > without this patch verus > $ tar xvfj core-image-minimal-qemux86-64.rootfs-dbg.tar.bz2 > with this patch applied shows some differences. This is expected > because > some of the post rootfs steps run after rootfs gets copied to > rootfs-dbg. Changing this would require more changes. > > $ diff -r --no-dereference debug-fs1 debug-fs2 > Only in debug-fs1/etc/default: postinst > Only in debug-fs2/etc/init.d: run-postinsts > diff -r --no-dereference debug-fs1/etc/issue debug-fs2/etc/issue > 1c1 > < Poky (Yocto Project Reference Distro) 4.3+snapshot- > bc66d6ea4b3a6e6c9131295ee0783b88b5a90a02 \n \l > --- > > Poky (Yocto Project Reference Distro) 4.3+snapshot- > 44ec9356d2d8686189531b55b2bd2b268b5dffa3 \n \l > diff -r --no-dereference debug-fs1/etc/issue.net debug- > fs2/etc/issue.net > 1c1 > < Poky (Yocto Project Reference Distro) 4.3+snapshot- > bc66d6ea4b3a6e6c9131295ee0783b88b5a90a02 %h > --- > > Poky (Yocto Project Reference Distro) 4.3+snapshot- > 44ec9356d2d8686189531b55b2bd2b268b5dffa3 %h > Only in debug-fs1/etc: ld.so.cache > Only in debug-fs2/etc/rcS.d: S99run-postinsts > Only in debug-fs1/etc: timestamp > Only in debug-fs1/etc: version > Only in debug-fs2/usr/sbin: run-postinsts > Only in debug-fs2/var/volatile: log > Only in debug-fs2/var/volatile: tmp > > Best reagrds, > Adrian > > > Cheers, > > > > Richard > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#190602): https://lists.openembedded.org/g/openembedded-core/message/190602 > Mute This Topic: https://lists.openembedded.org/mt/102316026/3617123 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [kergoth@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
On Wed, 2023-11-15 at 09:26 -0700, Christopher Larson wrote: > > Can you explain your issues with gdb with using a rootfs-dbg, because > I don’t see any problem with a filesystem that only contains debug > symbols, given how easily gdb can be configured to look into > alternate paths. I’ll admit I also don’t know the difference between > these modes, and also wonder how IMAGE_GEN_DEBUGFS relates. > > It simply does not find the symbols if only the rootfs-dbg is available. If this class https://git.yoctoproject.org/poky/tree/meta/classes-recipe/image-combined-dbg.bbclass is added to the build it just works. Since this is not too obvious, I wondered if it wouldn't be better if the combined debugfs were the default behavior. Then Ross asked the same question and I developed a patch to simplify this. But either way, there are too many unanswered questions to change a well-established default behavior. And there are other ways to deal with it. Thank you for pointing this out.
> -----Original Message----- > From: openembedded-core@lists.openembedded.org <openembedded- > core@lists.openembedded.org> On Behalf Of Adrian Freihofer > Sent: den 15 november 2023 23:33 > To: Christopher Larson <kergoth@gmail.com> > Cc: openembedded-core@lists.openembedded.org > Subject: Re: [OE-core] [PATCH v8 3/8] image-combined-dbg: make this the > default > > On Wed, 2023-11-15 at 09:26 -0700, Christopher Larson wrote: > > > > Can you explain your issues with gdb with using a rootfs-dbg, because > > I don’t see any problem with a filesystem that only contains debug > > symbols, given how easily gdb can be configured to look into > > alternate paths. I’ll admit I also don’t know the difference between > > these modes, and also wonder how IMAGE_GEN_DEBUGFS relates. > > > > > It simply does not find the symbols if only the rootfs-dbg is > available. If this class > https://git.yoctoproject.org/poky/tree/meta/classes-recipe/image-combined-dbg.bbclass > is added to the build it just works. > > Since this is not too obvious, I wondered if it wouldn't be better if > the combined debugfs were the default behavior. Then Ross asked the > same question and I developed a patch to simplify this. > > But either way, there are too many unanswered questions to change a > well-established default behavior. And there are other ways to deal with it. > Thank you for pointing this out. For what it's worth, we have local changes that more or less do this (predating image-combined-dbg.bbclass), as we have only seen a use case for the combined debugfs tar ball. So I was rather hoping this would be accepted, so that we can drop our local changes... //Peter
While the debug-only rootfs is not usable by itself, changing the way it's currently combined (from the doc) could produce unintended side effects. Check out this post for explanations: https://lists.openembedded.org/g/openembedded-core/message/190490
On Mon, 2023-11-20 at 22:53 +0000, Peter Kjellerstedt wrote: > > -----Original Message----- > > From: openembedded-core@lists.openembedded.org <openembedded- > > core@lists.openembedded.org> On Behalf Of Adrian Freihofer > > Sent: den 15 november 2023 23:33 > > To: Christopher Larson <kergoth@gmail.com> > > Cc: openembedded-core@lists.openembedded.org > > Subject: Re: [OE-core] [PATCH v8 3/8] image-combined-dbg: make this > > the > > default > > > > On Wed, 2023-11-15 at 09:26 -0700, Christopher Larson wrote: > > > > > > Can you explain your issues with gdb with using a rootfs-dbg, > > > because > > > I don’t see any problem with a filesystem that only contains > > > debug > > > symbols, given how easily gdb can be configured to look into > > > alternate paths. I’ll admit I also don’t know the difference > > > between > > > these modes, and also wonder how IMAGE_GEN_DEBUGFS relates. > > > > > > > > It simply does not find the symbols if only the rootfs-dbg is > > available. If this class > > https://git.yoctoproject.org/poky/tree/meta/classes-recipe/image-combined-dbg.bbclass > > is added to the build it just works. > > > > Since this is not too obvious, I wondered if it wouldn't be better > > if > > the combined debugfs were the default behavior. Then Ross asked the > > same question and I developed a patch to simplify this. > > > > But either way, there are too many unanswered questions to change a > > well-established default behavior. And there are other ways to deal > > with it. > > Thank you for pointing this out. > > For what it's worth, we have local changes that more or less do this > (predating image-combined-dbg.bbclass), as we have only seen a use > case for the combined debugfs tar ball. So I was rather hoping this > would be accepted, so that we can drop our local changes... > > //Peter > In theory, I completely agree with Christopher. That seems to be the right way to go. But I have tested this again. I am not able to configure GDB to find the sources with a split rootf + rootfs-dbg. I tried adding rootfs and rootfs-dbg in different order and with different paths to the solib search path. Stepping into libraries contained in rootfs/rootfs-dbg does not work. Maybe I did something wrong or we could consider this a bug in GDB. But with a combined rootfs-dbg this works in all the different variants I have tried. One approach to handle this is to improve GDB's solib search function to support a shared rootfs dbg. But it's not only about GDB. There are other tools which most probably have similar issues. From a usability point of view, I would at least like to have an easy and obvious way to configure a combined rootfs-dbg for an image. It took me an infinite amount of time to figure out why GDB doesn't work and that there is an image-combined-dbg.bbclass supposed to fix that. Defaulting to a not combined rootfs-dbg and providing code in a hidden bbclass is misleading. What could also help a bit is to make the code of the image-combined- dbg.bbclass more prominent and more official e.g. by moving it into the image.bbclass and support to enable it via variable which can be documented and referred in various sections of the documentation but also in the local.conf.template. The documentation should then point out that e.g. stepping with GDB does not work until the binaries are available from the same rootfs folder as the debug symbols are. Such a patch would be a minor refactoring only. @Peter: Would this help for your use case? This would also allow the default to be changed some when in the future. The question of who needs a shared dbg rootfs for which use case, as opposed to those who struggle with simple remote debugging because of this default behavior, still seems valid to me. But I also have to say that recent documentation points out that the rootfs.tar must be extracted into the extracted rootfs-dbg which is a working solution. The issue which I have is with the SDK which tries to avoid building the tars and extracting them again just for providing the debug symbols on the host. This use case is probably new. Best regards, Adrian
On Wed, 22 Nov 2023 at 13:23, Adrian Freihofer <adrian.freihofer@gmail.com> wrote: > But I also have to say that recent documentation points out that the > rootfs.tar must be extracted into the extracted rootfs-dbg which is a > working solution. The issue which I have is with the SDK which tries to > avoid building the tars and extracting them again just for providing > the debug symbols on the host. This use case is probably new. Sorry for barging in without fully understanding the issue, but I've added debuginfod support to yocto precisely to avoid having to deal with large, awkward, slow debug filesystems. It's a lot leaner and slimmer approach. Alex
On Wed, 2023-11-22 at 13:25 +0100, Alexander Kanavin wrote: > On Wed, 22 Nov 2023 at 13:23, Adrian Freihofer > <adrian.freihofer@gmail.com> wrote: > > > But I also have to say that recent documentation points out that > > the > > rootfs.tar must be extracted into the extracted rootfs-dbg which is > > a > > working solution. The issue which I have is with the SDK which > > tries to > > avoid building the tars and extracting them again just for > > providing > > the debug symbols on the host. This use case is probably new. > > Sorry for barging in without fully understanding the issue, but I've > added debuginfod support to yocto precisely to avoid having to deal > with large, awkward, slow debug filesystems. It's a lot leaner and > slimmer approach. > Thank you Alex. Looking at that is already on my todo list. I think is is a very interesting approach. But I hesitated a bit because creating some files seems to be easier than starting and stopping a daemon behind an IDE. And the fact that debuginfod is available probably doesn't mean that rootfs-dbg is no longer supported. So let's just get started and then improve. Adrian
diff --git a/meta/classes-recipe/image-combined-dbg.bbclass b/meta/classes-recipe/image-combined-dbg.bbclass deleted file mode 100644 index 729313739c1..00000000000 --- a/meta/classes-recipe/image-combined-dbg.bbclass +++ /dev/null @@ -1,15 +0,0 @@ -# -# Copyright OpenEmbedded Contributors -# -# SPDX-License-Identifier: MIT -# - -IMAGE_PREPROCESS_COMMAND:append = " combine_dbg_image" - -combine_dbg_image () { - if [ "${IMAGE_GEN_DEBUGFS}" = "1" -a -e ${IMAGE_ROOTFS}-dbg ]; then - # copy target files into -dbg rootfs, so it can be used for - # debug purposes directly - tar -C ${IMAGE_ROOTFS} -cf - . | tar -C ${IMAGE_ROOTFS}-dbg -xf - - fi -} diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py index 1a48ed10b3f..a1cc28a6dd0 100644 --- a/meta/lib/oe/rootfs.py +++ b/meta/lib/oe/rootfs.py @@ -111,40 +111,17 @@ class Rootfs(object, metaclass=ABCMeta): if gen_debugfs != '1': return + rootfs_orig = self.image_rootfs + '-orig' + bb.note(" Renaming the original rootfs...") try: - shutil.rmtree(self.image_rootfs + '-orig') + shutil.rmtree(rootfs_orig) except: pass - bb.utils.rename(self.image_rootfs, self.image_rootfs + '-orig') + bb.utils.rename(self.image_rootfs, rootfs_orig) bb.note(" Creating debug rootfs...") - bb.utils.mkdirhier(self.image_rootfs) - - bb.note(" Copying back package database...") - for path in package_paths: - bb.utils.mkdirhier(self.image_rootfs + os.path.dirname(path)) - if os.path.isdir(self.image_rootfs + '-orig' + path): - shutil.copytree(self.image_rootfs + '-orig' + path, self.image_rootfs + path, symlinks=True) - elif os.path.isfile(self.image_rootfs + '-orig' + path): - shutil.copyfile(self.image_rootfs + '-orig' + path, self.image_rootfs + path) - - # Copy files located in /usr/lib/debug or /usr/src/debug - for dir in ["/usr/lib/debug", "/usr/src/debug"]: - src = self.image_rootfs + '-orig' + dir - if os.path.exists(src): - dst = self.image_rootfs + dir - bb.utils.mkdirhier(os.path.dirname(dst)) - shutil.copytree(src, dst) - - # Copy files with suffix '.debug' or located in '.debug' dir. - for root, dirs, files in os.walk(self.image_rootfs + '-orig'): - relative_dir = root[len(self.image_rootfs + '-orig'):] - for f in files: - if f.endswith('.debug') or '/.debug' in relative_dir: - bb.utils.mkdirhier(self.image_rootfs + relative_dir) - shutil.copy(os.path.join(root, f), - self.image_rootfs + relative_dir) + shutil.copytree(rootfs_orig, self.image_rootfs, symlinks=True) bb.note(" Install complementary '*-dbg' packages...") self.pm.install_complementary('*-dbg') @@ -178,7 +155,7 @@ class Rootfs(object, metaclass=ABCMeta): bb.utils.rename(self.image_rootfs, self.image_rootfs + '-dbg') bb.note(" Restoring original rootfs...") - bb.utils.rename(self.image_rootfs + '-orig', self.image_rootfs) + bb.utils.rename(rootfs_orig, self.image_rootfs) def _exec_shell_cmd(self, cmd): try: diff --git a/scripts/crosstap b/scripts/crosstap index 5aa72f14d44..87dac33e064 100755 --- a/scripts/crosstap +++ b/scripts/crosstap @@ -170,18 +170,6 @@ class BitbakeEnv(object): return ret class ParamDiscovery(object): - SYMBOLS_CHECK_MESSAGE = """ -WARNING: image '%s' does not have dbg-pkgs IMAGE_FEATURES enabled and no -"image-combined-dbg" in inherited classes is specified. As result the image -does not have symbols for user-land processes DWARF based probes. Consider -adding 'dbg-pkgs' to EXTRA_IMAGE_FEATURES or adding "image-combined-dbg" to -USER_CLASSES. I.e add this line 'USER_CLASSES += "image-combined-dbg"' to -local.conf file. - -Or you may use IMAGE_GEN_DEBUGFS="1" option, and then after build you need -recombine/unpack image and image-dbg tarballs and pass resulting dir location -with --sysroot option. -""" def __init__(self, image): self.image = image @@ -204,8 +192,6 @@ with --sysroot option. self.staging_dir_native = None - self.image_combined_dbg = False - def discover(self): if self.image: benv_image = BitbakeEnv(self.image) @@ -248,10 +234,6 @@ with --sysroot option. (self.staging_dir_native ) = benv_systemtap.get_vars(["STAGING_DIR_NATIVE"]) - if self.inherit: - if "image-combined-dbg" in self.inherit.split(): - self.image_combined_dbg = True - def check(self, sysroot_option): ret = True if self.image_rootfs: @@ -280,10 +262,6 @@ with --sysroot option. if "dbg-pkgs" in image_features: dbg_pkgs_found = True - if not dbg_pkgs_found \ - and not self.image_combined_dbg: - print(ParamDiscovery.SYMBOLS_CHECK_MESSAGE % (self.image)) - if not ret: print("") @@ -310,10 +288,7 @@ with --sysroot option. stap.stap = self.staging_dir_native + "/usr/bin/stap" if not stap.sysroot: if self.image_rootfs: - if self.image_combined_dbg: - stap.sysroot = self.image_rootfs + "-dbg" - else: - stap.sysroot = self.image_rootfs + stap.sysroot = self.image_rootfs + "-dbg" stap.runtime = self.staging_dir_native + "/usr/share/systemtap/runtime" stap.tapset = self.staging_dir_native + "/usr/share/systemtap/tapset" stap.arch = self.__map_systemtap_arch() @@ -362,7 +337,6 @@ configuration is recommended: # enables symbol + target binaries rootfs-dbg in workspace IMAGE_GEN_DEBUGFS = "1" IMAGE_FSTYPES_DEBUGFS = "tar.bz2" -USER_CLASSES += "image-combined-dbg" # enables kernel debug symbols KERNEL_EXTRA_FEATURES:append = " features/debug/debug-kernel.scc"
Remove the image-combined-dbg.bbclass and make this the default behavior for the rootfs-dbg. A rootfs-dbg with only debug symbols but no executable binaries also causes problems with gdb, which is probably the most common use case for the roofs-dbg. This change simplifies and improves the user experience for a slightly larger rootfs-dbg. If the rootfs-dbg contains a complete copy of the rootfs, it is also usable for booting the target device over the network. This in turn simplifies other use cases with e.g. the use of perf on a device booted over the network. Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> --- .../classes-recipe/image-combined-dbg.bbclass | 15 -------- meta/lib/oe/rootfs.py | 35 ++++--------------- scripts/crosstap | 28 +-------------- 3 files changed, 7 insertions(+), 71 deletions(-) delete mode 100644 meta/classes-recipe/image-combined-dbg.bbclass